Rewrite preferences with a modified support library v7

This commit is contained in:
len
2016-06-16 20:52:51 +02:00
parent cd92569355
commit 9beeca652f
28 changed files with 493 additions and 506 deletions

View File

@@ -8,7 +8,6 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@color/colorPrimaryDark</item>
<item name="android:alertDialogTheme">@style/Theme.AlertDialog.Light</item>
</style>
<!--============-->
@@ -19,6 +18,5 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@color/colorPrimaryDark</item>
<item name="android:alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
</style>
</resources>

View File

@@ -26,7 +26,9 @@
<!-- Themes -->
<item name="windowActionModeOverlay">true</item>
<item name="actionBarTheme">@style/Theme.ActionBar.Light</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Material</item>
<item name="alertDialogTheme">@style/Theme.AlertDialog.Light</item>
<!-- Custom Attributes-->
<item name="selectable_list_drawable">@drawable/list_item_selector_light</item>
@@ -61,7 +63,9 @@
<item name="windowActionModeOverlay">true</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Material</item>
<item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
<!-- Custom Attributes-->
<item name="navigation_view_theme">@style/Theme.Widget.NavigationView.Dark</item>

View File

@@ -1,28 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="acra.enable"
android:summary="@string/pref_acra_summary"
android:title="@string/pref_enable_acra"/>
<PreferenceScreen
android:key="about_screen"
android:title="@string/pref_category_about"
android:persistent="false">
<!--<SwitchPreferenceCompat-->
<!--android:defaultValue="false"-->
<!--android:enabled="false"-->
<!--android:key="@string/pref_enable_automatic_updates_key"-->
<!--android:summary="@string/pref_enable_automatic_updates_summary"-->
<!--android:title="@string/pref_enable_automatic_updates"/>-->
<SwitchPreference
android:defaultValue="true"
android:key="acra.enable"
android:summary="@string/pref_acra_summary"
android:title="@string/pref_enable_acra"/>
<Preference
android:key="@string/pref_version"
android:persistent="false"
android:title="@string/version"/>
<!--<SwitchPreferenceCompat-->
<!--android:defaultValue="false"-->
<!--android:enabled="false"-->
<!--android:key="@string/pref_enable_automatic_updates_key"-->
<!--android:summary="@string/pref_enable_automatic_updates_summary"-->
<!--android:title="@string/pref_enable_automatic_updates"/>-->
<Preference
android:key="@string/pref_build_time"
android:persistent="false"
android:title="@string/build_time"/>
<Preference
android:key="@string/pref_version"
android:persistent="false"
android:title="@string/version"/>
</android.support.v7.preference.PreferenceScreen>
<Preference
android:key="@string/pref_build_time"
android:persistent="false"
android:title="@string/build_time"/>
</PreferenceScreen>
</PreferenceScreen>

View File

@@ -1,24 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<Preference
android:key="@string/pref_clear_chapter_cache_key"
android:title="@string/pref_clear_chapter_cache"/>
<PreferenceScreen
android:key="advanced_screen"
android:persistent="false"
android:title="@string/pref_category_advanced">
<Preference
android:key="@string/pref_clear_cookies_key"
android:title="@string/pref_clear_cookies"/>
<Preference
android:key="@string/pref_clear_chapter_cache_key"
android:title="@string/pref_clear_chapter_cache"/>
<Preference
android:key="@string/pref_clear_database_key"
android:summary="@string/pref_clear_database_summary"
android:title="@string/pref_clear_database"/>
<Preference
android:key="@string/pref_clear_cookies_key"
android:title="@string/pref_clear_cookies"/>
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/pref_reencode_key"
android:summary="@string/pref_reencode_summary"
android:title="@string/pref_reencode"/>
<Preference
android:key="@string/pref_clear_database_key"
android:summary="@string/pref_clear_database_summary"
android:title="@string/pref_clear_database"/>
</android.support.v7.preference.PreferenceScreen>
<SwitchPreference
android:defaultValue="false"
android:key="@string/pref_reencode_key"
android:summary="@string/pref_reencode_summary"
android:title="@string/pref_reencode"/>
</PreferenceScreen>
</PreferenceScreen>

View File

@@ -1,43 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<Preference
android:key="@string/pref_download_directory_key"
android:title="@string/pref_download_directory"/>
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="@string/pref_download_only_over_wifi_key"
android:title="@string/pref_download_only_over_wifi"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:defaultValue="1"
android:entries="@array/download_slots"
android:entryValues="@array/download_slots"
android:key="@string/pref_download_slots_key"
android:summary="%s"
android:title="@string/pref_download_slots"/>
<PreferenceCategory
<PreferenceScreen
android:key="downloads_screen"
android:persistent="false"
android:title="@string/cat_remove_after_read"/>
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/pref_remove_after_marked_as_read_key"
android:title="@string/pref_remove_after_marked_as_read"/>
android:title="@string/pref_category_downloads">
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/pref_remove_after_read_key"
android:summary="@string/current_chapter"
android:title="@string/pref_remove_after_read"/>
<Preference
android:key="@string/pref_download_directory_key"
android:title="@string/pref_download_directory"/>
<SwitchPreferenceCompat
android:defaultValue="false"
android:dependency="@string/pref_remove_after_read_key"
android:key="@string/pref_remove_after_read_previous_key"
android:summary="@string/previous_chapter"
android:title="@string/pref_remove_after_read"/>
<SwitchPreference
android:defaultValue="true"
android:key="@string/pref_download_only_over_wifi_key"
android:title="@string/pref_download_only_over_wifi"/>
</android.support.v7.preference.PreferenceScreen>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:defaultValue="1"
android:entries="@array/download_slots"
android:entryValues="@array/download_slots"
android:key="@string/pref_download_slots_key"
android:summary="%s"
android:title="@string/pref_download_slots"/>
<PreferenceCategory
android:persistent="false"
android:title="@string/cat_remove_after_read"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/pref_remove_after_marked_as_read_key"
android:title="@string/pref_remove_after_marked_as_read"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/pref_remove_after_read_key"
android:summary="@string/current_chapter"
android:title="@string/pref_remove_after_read"/>
<SwitchPreference
android:defaultValue="false"
android:dependency="@string/pref_remove_after_read_key"
android:key="@string/pref_remove_after_read_previous_key"
android:summary="@string/previous_chapter"
android:title="@string/pref_remove_after_read"/>
</PreferenceScreen>
</PreferenceScreen>

View File

@@ -1,39 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:defaultValue="1"
android:entries="@array/themes"
android:entryValues="@array/themes_values"
android:key="@string/pref_theme_key"
android:summary="%s"
android:title="@string/pref_theme"/>
<eu.kanade.tachiyomi.widget.preference.SimpleDialogPreference
android:dialogLayout="@layout/pref_library_columns"
android:key="@string/pref_library_columns_dialog_key"
<PreferenceScreen
android:key="general_screen"
android:persistent="false"
android:title="@string/pref_library_columns"/>
android:title="@string/pref_category_general">
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:defaultValue="0"
android:entries="@array/library_update_interval"
android:entryValues="@array/library_update_interval_values"
android:key="@string/pref_library_update_interval_key"
android:summary="%s"
android:title="@string/pref_library_update_interval"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:defaultValue="1"
android:entries="@array/themes"
android:entryValues="@array/themes_values"
android:key="@string/pref_theme_key"
android:summary="%s"
android:title="@string/pref_theme"/>
<MultiSelectListPreference
android:entries="@array/library_update_restrictions"
android:entryValues="@array/library_update_restrictions_values"
android:key="@string/pref_library_update_restriction_key"
android:summary="@string/pref_library_update_restriction_summary"
android:title="@string/pref_library_update_restriction" />
<eu.kanade.tachiyomi.widget.preference.SimpleDialogPreference
android:dialogLayout="@layout/pref_library_columns"
android:key="@string/pref_library_columns_dialog_key"
android:persistent="false"
android:title="@string/pref_library_columns"/>
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/pref_update_only_non_completed_key"
android:title="@string/pref_update_only_non_completed"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:defaultValue="0"
android:entries="@array/library_update_interval"
android:entryValues="@array/library_update_interval_values"
android:key="@string/pref_library_update_interval_key"
android:summary="%s"
android:title="@string/pref_library_update_interval"/>
</android.support.v7.preference.PreferenceScreen>
<MultiSelectListPreference
android:entries="@array/library_update_restrictions"
android:entryValues="@array/library_update_restrictions_values"
android:key="@string/pref_library_update_restriction_key"
android:summary="@string/pref_library_update_restriction_summary"
android:title="@string/pref_library_update_restriction" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/pref_update_only_non_completed_key"
android:title="@string/pref_update_only_non_completed"/>
</PreferenceScreen>
</PreferenceScreen>

View File

@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android" >
<Preference
android:key="@string/pref_category_general_key"
android:persistent="false"
android:title="@string/pref_category_general" />
<Preference
android:key="@string/pref_category_reader_key"
android:persistent="false"
android:title="@string/pref_category_reader" />
<Preference
android:key="@string/pref_category_downloads_key"
android:persistent="false"
android:title="@string/pref_category_downloads" />
<Preference
android:key="@string/pref_category_sources_key"
android:persistent="false"
android:title="@string/pref_category_sources" />
<Preference
android:key="@string/pref_category_sync_key"
android:persistent="false"
android:title="@string/pref_category_sync" />
<Preference
android:key="@string/pref_category_advanced_key"
android:persistent="false"
android:title="@string/pref_category_advanced" />
<Preference
android:key="@string/pref_category_about_key"
android:persistent="false"
android:title="@string/pref_category_about" />
</android.support.v7.preference.PreferenceScreen>

View File

@@ -1,93 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_viewer_type"
android:key="@string/pref_default_viewer_key"
android:entries="@array/viewers"
android:entryValues="@array/viewers_values"
android:defaultValue="1"
android:summary="%s"/>
<PreferenceScreen
android:key="reader_screen"
android:persistent="false"
android:title="@string/pref_category_reader">
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_image_scale_type"
android:key="@string/pref_image_scale_type_key"
android:entries="@array/image_scale_type"
android:entryValues="@array/image_scale_type_values"
android:defaultValue="1"
android:summary="%s"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_viewer_type"
android:key="@string/pref_default_viewer_key"
android:entries="@array/viewers"
android:entryValues="@array/viewers_values"
android:defaultValue="1"
android:summary="%s"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_zoom_start"
android:key="@string/pref_zoom_start_key"
android:entries="@array/zoom_start"
android:entryValues="@array/zoom_start_values"
android:defaultValue="1"
android:summary="%s"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_image_scale_type"
android:key="@string/pref_image_scale_type_key"
android:entries="@array/image_scale_type"
android:entryValues="@array/image_scale_type_values"
android:defaultValue="1"
android:summary="%s"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_rotation_type"
android:key="@string/pref_rotation_type_key"
android:entries="@array/rotation_type"
android:entryValues="@array/rotation_type_values"
android:defaultValue="1"
android:summary="%s"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_zoom_start"
android:key="@string/pref_zoom_start_key"
android:entries="@array/zoom_start"
android:entryValues="@array/zoom_start_values"
android:defaultValue="1"
android:summary="%s"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_reader_theme"
android:key="@string/pref_reader_theme_key"
android:entries="@array/reader_themes"
android:entryValues="@array/reader_themes_values"
android:defaultValue="0"
android:summary="%s"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_rotation_type"
android:key="@string/pref_rotation_type_key"
android:entries="@array/rotation_type"
android:entryValues="@array/rotation_type_values"
android:defaultValue="1"
android:summary="%s"/>
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_image_decoder"
android:key="@string/pref_image_decoder_key"
android:entries="@array/image_decoders"
android:entryValues="@array/image_decoders_values"
android:defaultValue="0"
android:summary="%s" />
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_reader_theme"
android:key="@string/pref_reader_theme_key"
android:entries="@array/reader_themes"
android:entryValues="@array/reader_themes_values"
android:defaultValue="0"
android:summary="%s"/>
<SwitchPreferenceCompat
android:title="@string/pref_hide_status_bar"
android:key="@string/pref_hide_status_bar_key"
android:defaultValue="true" />
<eu.kanade.tachiyomi.widget.preference.IntListPreference
android:title="@string/pref_image_decoder"
android:key="@string/pref_image_decoder_key"
android:entries="@array/image_decoders"
android:entryValues="@array/image_decoders_values"
android:defaultValue="0"
android:summary="%s" />
<SwitchPreferenceCompat
android:title="@string/pref_enable_transitions"
android:key="@string/pref_enable_transitions_key"
android:defaultValue="true" />
<SwitchPreferenceCompat
android:title="@string/pref_show_page_number"
android:key="@string/pref_show_page_number_key"
android:defaultValue="true" />
<SwitchPreferenceCompat
android:title="@string/pref_custom_brightness"
android:key="@string/pref_custom_brightness_key"
android:defaultValue="false" />
<SwitchPreferenceCompat
android:title="@string/pref_keep_screen_on"
android:key="@string/pref_keep_screen_on_key"
android:defaultValue="true" />
<PreferenceCategory
android:title="@string/pref_reader_navigation">
<SwitchPreferenceCompat
android:title="@string/pref_read_with_tapping"
android:key="@string/pref_read_with_tapping_key"
<SwitchPreference
android:title="@string/pref_hide_status_bar"
android:key="@string/pref_hide_status_bar_key"
android:defaultValue="true" />
<SwitchPreferenceCompat
android:title="@string/pref_read_with_volume_keys"
android:key="@string/pref_read_with_volume_keys_key"
<SwitchPreference
android:title="@string/pref_enable_transitions"
android:key="@string/pref_enable_transitions_key"
android:defaultValue="true" />
<SwitchPreference
android:title="@string/pref_show_page_number"
android:key="@string/pref_show_page_number_key"
android:defaultValue="true" />
<SwitchPreference
android:title="@string/pref_custom_brightness"
android:key="@string/pref_custom_brightness_key"
android:defaultValue="false" />
</PreferenceCategory>
<SwitchPreference
android:title="@string/pref_keep_screen_on"
android:key="@string/pref_keep_screen_on_key"
android:defaultValue="true" />
</android.support.v7.preference.PreferenceScreen>
<PreferenceCategory
android:title="@string/pref_reader_navigation">
<SwitchPreference
android:title="@string/pref_read_with_tapping"
android:key="@string/pref_read_with_tapping_key"
android:defaultValue="true" />
<SwitchPreference
android:title="@string/pref_read_with_volume_keys"
android:key="@string/pref_read_with_volume_keys_key"
android:defaultValue="false" />
</PreferenceCategory>
</PreferenceScreen>
</PreferenceScreen>

View File

@@ -1,16 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:orderingFromXml="true">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<MultiSelectListPreference
android:key="@string/pref_source_languages"
android:title="@string/languages"
android:summary="@string/languages_summary"/>
<PreferenceCategory
android:key="pref_sources"
<PreferenceScreen
android:key="sources_screen"
android:persistent="false"
android:title="@string/accounts"/>
android:title="@string/pref_category_sources">
</android.support.v7.preference.PreferenceScreen>
<MultiSelectListPreference
android:key="@string/pref_source_languages"
android:title="@string/languages"
android:summary="@string/languages_summary"/>
<PreferenceCategory
android:key="pref_sources"
android:persistent="false"
android:title="@string/accounts"/>
</PreferenceScreen>
</PreferenceScreen>

View File

@@ -1,22 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:orderingFromXml="true">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreferenceCompat
android:key="@string/pref_auto_update_manga_sync_key"
android:title="@string/pref_auto_update_manga_sync"
android:defaultValue="true"/>
<PreferenceScreen
android:key="sync_screen"
android:persistent="false"
android:title="@string/pref_category_sync">
<SwitchPreferenceCompat
android:key="@string/pref_ask_update_manga_sync_key"
android:title="@string/pref_ask_update_manga_sync"
android:defaultValue="false"
android:dependency="@string/pref_auto_update_manga_sync_key"/>
<SwitchPreference
android:key="@string/pref_auto_update_manga_sync_key"
android:title="@string/pref_auto_update_manga_sync"
android:defaultValue="true"/>
<PreferenceCategory
android:key="pref_category_manga_sync_accounts"
android:title="@string/services"
android:persistent="false"/>
<SwitchPreference
android:key="@string/pref_ask_update_manga_sync_key"
android:title="@string/pref_ask_update_manga_sync"
android:defaultValue="false"
android:dependency="@string/pref_auto_update_manga_sync_key"/>
</android.support.v7.preference.PreferenceScreen>
<PreferenceCategory
android:key="pref_category_manga_sync_accounts"
android:title="@string/services"
android:persistent="false"/>
</PreferenceScreen>
</PreferenceScreen>