Error handling added
This commit is contained in:
parent
a773074c77
commit
8dfb0dc8dd
50 changed files with 2206 additions and 1473 deletions
|
@ -42,7 +42,7 @@ public class RetroColorUtil {
|
|||
if (inverse != -1) {
|
||||
return ColorUtils.getReadableText(inverse, background, 150);
|
||||
}
|
||||
return ColorUtil.stripAlpha(getSwatch(palette).getTitleTextColor());
|
||||
return ColorUtil.INSTANCE.stripAlpha(getSwatch(palette).getTitleTextColor());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -163,8 +163,8 @@ public class RetroColorUtil {
|
|||
|
||||
@ColorInt
|
||||
public static int shiftBackgroundColorForLightText(@ColorInt int backgroundColor) {
|
||||
while (ColorUtil.isColorLight(backgroundColor)) {
|
||||
backgroundColor = ColorUtil.darkenColor(backgroundColor);
|
||||
while (ColorUtil.INSTANCE.isColorLight(backgroundColor)) {
|
||||
backgroundColor = ColorUtil.INSTANCE.darkenColor(backgroundColor);
|
||||
}
|
||||
return backgroundColor;
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ public class RetroUtil {
|
|||
public static Drawable getTintedDrawable(@DrawableRes int id) {
|
||||
return TintHelper
|
||||
.createTintedDrawable(ContextCompat.getDrawable(App.Companion.getInstance(), id),
|
||||
ThemeStore.accentColor(App.Companion.getInstance()));
|
||||
ThemeStore.Companion.accentColor(App.Companion.getInstance()));
|
||||
}
|
||||
|
||||
public static Bitmap createBitmap(Drawable drawable, float sizeMultiplier) {
|
||||
|
|
|
@ -78,7 +78,7 @@ public class ViewUtil {
|
|||
FastScrollRecyclerView recyclerView, int accentColor) {
|
||||
recyclerView.setPopupBgColor(accentColor);
|
||||
recyclerView.setPopupTextColor(
|
||||
MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(accentColor)));
|
||||
MaterialValueHelper.INSTANCE.getPrimaryTextColor(context, ColorUtil.INSTANCE.isColorLight(accentColor)));
|
||||
recyclerView.setThumbColor(accentColor);
|
||||
recyclerView.setTrackColor(Color.TRANSPARENT);
|
||||
//recyclerView.setTrackColor(ColorUtil.withAlpha(ATHUtil.resolveColor(context, R.attr.colorControlNormal), 0.12f));
|
||||
|
|
|
@ -124,7 +124,7 @@ public class MediaNotificationProcessor {
|
|||
}
|
||||
|
||||
private int selectForegroundColor(int backgroundColor, Palette palette) {
|
||||
if (ColorUtil.isColorLight(backgroundColor)) {
|
||||
if (ColorUtil.INSTANCE.isColorLight(backgroundColor)) {
|
||||
return selectForegroundColorForSwatches(palette.getDarkVibrantSwatch(),
|
||||
palette.getVibrantSwatch(),
|
||||
palette.getDarkMutedSwatch(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue