Add an option to change cache size and clear the cache
This commit is contained in:
@@ -27,4 +27,16 @@
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cache_size">
|
||||
<item>50 MB</item>
|
||||
<item>75 MB</item>
|
||||
<item>100 MB</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cache_values">
|
||||
<item>50</item>
|
||||
<item>75</item>
|
||||
<item>100</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@@ -3,6 +3,7 @@
|
||||
<string name="pref_category_reader_key">pref_category_reader_key</string>
|
||||
<string name="pref_category_accounts_key">pref_category_accounts_key</string>
|
||||
<string name="pref_category_downloads_key">pref_category_downloads_key</string>
|
||||
<string name="pref_category_cache_key">pref_category_cache_key</string>
|
||||
|
||||
<string name="pref_default_viewer_key">pref_default_viewer_key</string>
|
||||
<string name="pref_hide_status_bar_key">pref_hide_status_bar_key</string>
|
||||
@@ -15,4 +16,7 @@
|
||||
|
||||
<string name="pref_download_directory_key">pref_download_directory_key</string>
|
||||
<string name="pref_download_threads_key">pref_download_threads_key</string>
|
||||
|
||||
<string name="pref_chapter_cache_size_key">pref_chapter_cache_size_key</string>
|
||||
<string name="pref_clear_chapter_cache_key">pref_clear_chapter_cache_key</string>
|
||||
</resources>
|
||||
@@ -29,12 +29,16 @@
|
||||
<string name="button_ok">OK</string>
|
||||
<string name="button_cancel">Cancel</string>
|
||||
|
||||
<!-- Operations -->
|
||||
<string name="deleting_files">Deleting files…</string>
|
||||
<string name="loading">Loading…</string>
|
||||
|
||||
<!-- Preferences -->
|
||||
<!-- Subsections -->
|
||||
<string name="pref_category_reader">Reader</string>
|
||||
<string name="pref_category_accounts">Accounts</string>
|
||||
<string name="pref_category_downloads">Downloads</string>
|
||||
<string name="pref_category_cache">Cache</string>
|
||||
|
||||
<!-- Reader section -->
|
||||
<string name="pref_hide_status_bar">Hide status bar</string>
|
||||
@@ -53,16 +57,22 @@
|
||||
<string name="pref_download_directory">Downloads directory</string>
|
||||
<string name="pref_download_threads">Download threads</string>
|
||||
|
||||
<!-- Cache section -->
|
||||
<string name="pref_chapter_cache_size">Chapters cache size</string>
|
||||
<string name="pref_clear_chapter_cache">Clear chapter cache</string>
|
||||
<string name="used_cache">Used: %1$s</string>
|
||||
<string name="cache_deleted">Cache cleared. %1$d files have been deleted</string>
|
||||
<string name="cache_delete_error">An error occurred clearing cache</string>
|
||||
|
||||
|
||||
<!-- Login dialog -->
|
||||
<string name="accounts_login_title">Login for %1$s</string>
|
||||
<string name="username">Username</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="show_password">Show password</string>
|
||||
<string name="check_credentials">Check credentials</string>
|
||||
<string name="login">Login</string>
|
||||
<string name="login_success">Login successful</string>
|
||||
<string name="invalid_login">Login error</string>
|
||||
<string name="loading">Loading…</string>
|
||||
<string name="unknown_error">Unknown error</string>
|
||||
|
||||
<!-- Library fragment -->
|
||||
|
||||
16
app/src/main/res/xml/pref_cache.xml
Normal file
16
app/src/main/res/xml/pref_cache.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<eu.kanade.mangafeed.ui.setting.preference.IntListPreference
|
||||
android:title="@string/pref_chapter_cache_size"
|
||||
android:key="@string/pref_chapter_cache_size_key"
|
||||
android:entries="@array/cache_size"
|
||||
android:entryValues="@array/cache_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="75"/>
|
||||
|
||||
<Preference
|
||||
android:title="@string/pref_clear_chapter_cache"
|
||||
android:key="@string/pref_clear_chapter_cache_key" />
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -16,4 +16,9 @@
|
||||
android:persistent="false"
|
||||
android:title="@string/pref_category_accounts" />
|
||||
|
||||
<Preference
|
||||
android:key="@string/pref_category_cache_key"
|
||||
android:persistent="false"
|
||||
android:title="@string/pref_category_cache" />
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user