2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +00:00

Remove string.xml's version(v28) qualifier

This commit is contained in:
Anjani Kumar 2020-07-12 00:57:45 +05:30
parent b427627148
commit 2b136fac4f
3 changed files with 11 additions and 9 deletions

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="theme_list">
<item>System Default</item>
<item>Light</item>
<item>Dark</item>
</string-array>
</resources>

View File

@ -413,6 +413,12 @@
<item>Dark</item>
</string-array>
<string-array name="theme_list_v28">
<item>System Default</item>
<item>Light</item>
<item>Dark</item>
</string-array>
<string-array name="theme_list_values" translatable="false">
<item>default</item>
<item>light</item>

View File

@ -71,7 +71,11 @@ public class SettingsFragment extends PreferenceFragmentCompat {
themeSelector.setKey("theme_pref");
themeSelector.setTitle(R.string.theme_dialog_title);
themeSelector.setDialogTitle(R.string.theme_dialog_title);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
themeSelector.setEntries(R.array.theme_list_v28);
} else {
themeSelector.setEntries(R.array.theme_list);
}
themeSelector.setEntryValues(R.array.theme_list_values);
themeSelector.setDefaultValue(ThemeUtil.DEFAULT_MODE);
themeSelector.setSummaryProvider(ListPreference.SimpleSummaryProvider.getInstance());