Rename Day/Night and Day/Black to "Dynamic". On v28/Android Pie and lower, themes still change based on time of day. On Android 10 and up, theme changes in accordance with system dark mode setting.
This commit is contained in:
parent
d10ea92edd
commit
f506bfb14a
|
@ -24,6 +24,7 @@ import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
@ -85,7 +86,13 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
|
||||||
private static ImageLoader IMAGE_LOADER;
|
private static ImageLoader IMAGE_LOADER;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
// If Android Pie or older, set night mode by system clock
|
||||||
|
if (Build.VERSION.SDK_INT<29) {
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO);
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO);
|
||||||
|
} else {
|
||||||
|
// Else, for Android 10+, follow system dark mode setting
|
||||||
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<SubsonicFragment> backStack = new ArrayList<>();
|
final List<SubsonicFragment> backStack = new ArrayList<>();
|
||||||
|
|
|
@ -162,8 +162,8 @@
|
||||||
<string name="settings.theme_light">Light</string>
|
<string name="settings.theme_light">Light</string>
|
||||||
<string name="settings.theme_dark">Dark</string>
|
<string name="settings.theme_dark">Dark</string>
|
||||||
<string name="settings.theme_black">Black</string>
|
<string name="settings.theme_black">Black</string>
|
||||||
<string name="settings.theme_day_night">Day/Night</string>
|
<string name="settings.theme_day_night">Dynamic (Light/Dark)</string>
|
||||||
<string name="settings.theme_day_black_night">Day/Black Night</string>
|
<string name="settings.theme_day_black_night">Dynamic (Light/Black)</string>
|
||||||
<string name="settings.theme_fullscreen">Fullscreen</string>
|
<string name="settings.theme_fullscreen">Fullscreen</string>
|
||||||
<string name="settings.theme_fullscreen_summary">Hide as many UI elements as Android will allow</string>
|
<string name="settings.theme_fullscreen_summary">Hide as many UI elements as Android will allow</string>
|
||||||
<string name="settings.track_title">Display Track #</string>
|
<string name="settings.track_title">Display Track #</string>
|
||||||
|
|
Loading…
Reference in New Issue