diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-05-18 12:42:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 12:42:02 +0200 |
commit | 7d1259a39a81828d63ad6e32c53d791c60191e2c (patch) | |
tree | b335dbc003b3d73e9a63280dc7a02a415f515868 /app | |
parent | 3da7fcf8f0b17113c204375bfb09a084a4a04e82 (diff) | |
download | AntennaPod-7d1259a39a81828d63ad6e32c53d791c60191e2c.zip |
Fix default widget background (#6494)
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java index c33af33a4..c868ae8df 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java @@ -97,7 +97,7 @@ public class WidgetConfigActivity extends AppCompatActivity { ckFastForward.setChecked(prefs.getBoolean(PlayerWidget.KEY_WIDGET_FAST_FORWARD + appWidgetId, false)); ckSkip.setChecked(prefs.getBoolean(PlayerWidget.KEY_WIDGET_SKIP + appWidgetId, false)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - int color = prefs.getInt(PlayerWidget.KEY_WIDGET_COLOR + appWidgetId, 0); + int color = prefs.getInt(PlayerWidget.KEY_WIDGET_COLOR + appWidgetId, PlayerWidget.DEFAULT_COLOR); int opacity = Color.alpha(color) * 100 / 0xFF; opacitySeekBar.setProgress(opacity, false); @@ -139,6 +139,6 @@ public class WidgetConfigActivity extends AppCompatActivity { } private int getColorWithAlpha(int color, int opacity) { - return (int) Math.round(0xFF * (0.01 * opacity)) * 0x1000000 + color; + return (int) Math.round(0xFF * (0.01 * opacity)) * 0x1000000 + (color & 0xffffff); } } |