Witched to supportv7 prefs. Should fix a NPE when opening settings for some devices.

This commit is contained in:
Karim Abou Zeid 2016-02-03 20:10:16 +01:00
commit 9873f67139
9 changed files with 78 additions and 72 deletions

View file

@ -27,6 +27,8 @@
<!-- necessary to find the overflow button later in the layout-->
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
</style>
<style name="Theme.Phonograph.Base.Light" parent="Theme.AppCompat.Light.NoActionBar">
@ -55,6 +57,8 @@
<!-- necessary to find the overflow button later in the layout-->
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
</style>
<style name="Theme.Phonograph.Base.Black" parent="@style/Theme.Phonograph.Base">

View file

@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory android:title="@string/pref_header_audio">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_audio">
<com.kabouzeid.appthemehelper.common.prefs.ATESwitchPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="gapless_playback"
android:summary="@string/pref_summary_gapless_playback"
android:title="@string/pref_title_gapless_playback" />
<com.kabouzeid.appthemehelper.common.prefs.ATEPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreference
android:key="equalizer"
android:title="@string/equalizer" />
</com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory>
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</PreferenceScreen>
</android.support.v7.preference.PreferenceScreen>

View file

@ -1,32 +1,32 @@
<android. xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory android:title="@string/pref_header_colors">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_colors">
<com.kabouzeid.appthemehelper.common.prefs.ATEColorPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEColorPreference
android:key="primary_color"
android:persistent="false"
android:summary="@string/primary_color_desc"
android:title="@string/primary_color" />
<com.kabouzeid.appthemehelper.common.prefs.ATEColorPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEColorPreference
android:key="accent_color"
android:persistent="false"
android:summary="@string/accent_color_desc"
android:title="@string/accent_color" />
<com.kabouzeid.appthemehelper.common.prefs.ATESwitchPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
android:key="colored_notification"
android:summary="@string/pref_summary_colored_notification"
android:title="@string/pref_title_colored_notification" />
<com.kabouzeid.appthemehelper.common.prefs.ATESwitchPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="should_color_navigation_bar"
android:persistent="false"
android:summary="@string/pref_summary_colored_navigation_bar"
android:title="@string/pref_title_navigation_bar" />
</com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory>
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</android.>
</android.support.v7.preference.PreferenceScreen>

View file

@ -1,8 +1,8 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory android:title="@string/pref_header_general">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_general">
<com.kabouzeid.appthemehelper.common.prefs.ATEListPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEListPreference
android:defaultValue="-1"
android:entries="@array/pref_start_page_list_titles"
android:entryValues="@array/pref_start_page_list_values"
@ -11,7 +11,7 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_set_default_start_page" />
<com.kabouzeid.appthemehelper.common.prefs.ATEListPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEListPreference
android:defaultValue="light"
android:entries="@array/pref_general_theme_list_titles"
android:entryValues="@array/pref_general_theme_list_values"
@ -20,6 +20,6 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_general_theme" />
</com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory>
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</PreferenceScreen>
</android.support.v7.preference.PreferenceScreen>

View file

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory android:title="@string/pref_header_images">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_images">
<com.kabouzeid.appthemehelper.common.prefs.ATESwitchPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="ignore_media_store_artwork"
android:summary="@string/pref_summary_ignore_media_store_artwork"
android:title="@string/pref_title_ignore_media_store_artwork" />
<com.kabouzeid.appthemehelper.common.prefs.ATEListPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEListPreference
android:defaultValue="only_wifi"
android:entries="@array/pref_auto_download_images_titles"
android:entryValues="@array/pref_auto_download_images_values"
@ -18,6 +18,6 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_auto_download_artist_images" />
</com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory>
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</PreferenceScreen>
</android.support.v7.preference.PreferenceScreen>

View file

@ -1,20 +1,20 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory android:title="@string/pref_header_lockscreen">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_lockscreen">
<com.kabouzeid.appthemehelper.common.prefs.ATESwitchPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
android:key="album_art_on_lockscreen"
android:summary="@string/pref_summary_album_art_on_lockscreen"
android:title="@string/pref_title_album_art_on_lockscreen" />
<com.kabouzeid.appthemehelper.common.prefs.ATESwitchPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:dependency="album_art_on_lockscreen"
android:key="blurred_album_art"
android:summary="@string/pref_summary_blurred_album_art"
android:title="@string/pref_title_blurred_album_art" />
</com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory>
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</PreferenceScreen>
</android.support.v7.preference.PreferenceScreen>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory android:title="@string/pref_header_now_playing_screen">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_now_playing_screen">
<com.kabouzeid.appthemehelper.common.prefs.ATEListPreference
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEListPreference
android:enabled="false"
android:key="now_playing_layout"
android:negativeButtonText="@null"
@ -11,6 +11,6 @@
android:summary="Coming soon"
android:title="@string/pref_title_now_playing_layout" />
</com.kabouzeid.appthemehelper.common.prefs.ATEPreferenceCategory>
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</PreferenceScreen>
</android.support.v7.preference.PreferenceScreen>