Added changelog. Auto hide bottom bar and fab if playing queue is empty
This commit is contained in:
parent
eea6ba69ca
commit
73f3214b23
10 changed files with 211 additions and 4 deletions
|
|
@ -73,6 +73,15 @@ public class ColorUtil {
|
|||
return (alpha << 24) + (0x00ffffff & Color.HSVToColor(hsv));
|
||||
}
|
||||
|
||||
@SuppressWarnings("ResourceType")
|
||||
public static int shiftColorUp(@ColorInt int color) {
|
||||
int alpha = Color.alpha(color);
|
||||
float[] hsv = new float[3];
|
||||
Color.colorToHSV(color, hsv);
|
||||
hsv[2] *= 1.1f; // value component
|
||||
return (alpha << 24) + (0x00ffffff & Color.HSVToColor(hsv));
|
||||
}
|
||||
|
||||
public static float getLuminance(@ColorInt int color) {
|
||||
return (Color.red(color) * 0.299f + Color.green(color) * 0.587f + Color.blue(color) * 0.114f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ public final class PreferenceUtil {
|
|||
|
||||
public static final String HIDE_BOTTOM_BAR = "hide_bottom_bar";
|
||||
|
||||
public static final String LAST_CHANGELOG_VERSION = "last_changelog_version";
|
||||
|
||||
private static PreferenceUtil sInstance;
|
||||
|
||||
private final SharedPreferences mPreferences;
|
||||
|
|
@ -311,4 +313,12 @@ public final class PreferenceUtil {
|
|||
public final boolean artistColoredFooters() {
|
||||
return mPreferences.getBoolean(ARTIST_COLORED_FOOTERS, true);
|
||||
}
|
||||
|
||||
public void setLastChangeLogVersion(int version) {
|
||||
mPreferences.edit().putInt(LAST_CHANGELOG_VERSION, version).apply();
|
||||
}
|
||||
|
||||
public final int getLastChangelogVersion() {
|
||||
return mPreferences.getInt(LAST_CHANGELOG_VERSION, -1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue