Skip to content

Commit

Permalink
chore: spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
VishnuSanal committed Nov 18, 2023
1 parent 1b4d3ea commit 0bd52d4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions app/src/main/java/phone/vishnu/quotes/receiver/QuoteWidget.java
Expand Up @@ -32,7 +32,6 @@
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.util.Log;
import android.widget.RemoteViews;
import java.io.File;
import phone.vishnu.quotes.R;
Expand Down Expand Up @@ -107,11 +106,11 @@ private void updateQuoteWidget(Context context, Quote quote) {

remoteViews.setImageViewBitmap(
R.id.widgetQuoteContainerImageView,
buildBitmap(context, quote.getQuote(), Layout.Alignment.ALIGN_CENTER));
buildBitmap(context, quote.getQuote(), Layout.Alignment.ALIGN_CENTER));

remoteViews.setImageViewBitmap(
R.id.widgetAuthorContainerImageView,
buildBitmap(context, "- " + quote.getAuthor(), Layout.Alignment.ALIGN_OPPOSITE));
buildBitmap(context, "- " + quote.getAuthor(), Layout.Alignment.ALIGN_OPPOSITE));

remoteViews.setOnClickPendingIntent(
R.id.widgetShareImageView,
Expand Down Expand Up @@ -168,11 +167,7 @@ public Bitmap buildBitmap(Context context, String text, Layout.Alignment alignme
}

private void initAppWidget(final Context context) {
new QuotesRepository()
.getRandomQuote(
quote ->
updateQuoteWidget(context, quote)
);
new QuotesRepository().getRandomQuote(quote -> updateQuoteWidget(context, quote));
}

private void saveWidgetQuote(Context context, Quote quote) {
Expand Down

0 comments on commit 0bd52d4

Please sign in to comment.