feat(ImageProvider): add bitmapLrucache size setting
This commit is contained in:
@@ -105,14 +105,17 @@ class OtherConfigFragment : PreferenceFragment(),
|
||||
PreferKey.cleanCache -> clearCache()
|
||||
PreferKey.uploadRule -> showDialogFragment<DirectLinkUploadConfig>()
|
||||
PreferKey.checkSource -> showDialogFragment<CheckSourceConfig>()
|
||||
PreferKey.bitmapCacheSize -> NumberPickerDialog(requireContext())
|
||||
.setTitle(getString(R.string.bitmap_cache_size))
|
||||
.setMaxValue(9999)
|
||||
.setMinValue(1)
|
||||
.setValue(AppConfig.bitmapCacheSize)
|
||||
.show {
|
||||
AppConfig.bitmapCacheSize = it
|
||||
}
|
||||
PreferKey.bitmapCacheSize -> {
|
||||
toastOnUi(R.string.restart_to_apply_changes)
|
||||
NumberPickerDialog(requireContext())
|
||||
.setTitle(getString(R.string.bitmap_cache_size))
|
||||
.setMaxValue(9999)
|
||||
.setMinValue(1)
|
||||
.setValue(AppConfig.bitmapCacheSize)
|
||||
.show {
|
||||
AppConfig.bitmapCacheSize = it
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onPreferenceTreeClick(preference)
|
||||
}
|
||||
@@ -152,8 +155,6 @@ class OtherConfigFragment : PreferenceFragment(),
|
||||
}
|
||||
PreferKey.bitmapCacheSize -> {
|
||||
upPreferenceSummary(key, AppConfig.bitmapCacheSize.toString())
|
||||
// restart to apply changes
|
||||
appCtx.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -990,5 +990,7 @@
|
||||
<string name="add_remote_book">WebDavBook</string>
|
||||
<string name="bitmap_cache_size_summary">Current cache max size %1$s MB</string>
|
||||
<string name="bitmap_cache_size">bitmap cache size</string>
|
||||
<string name="restart_to_apply_changes">Restart to apply changes</string>
|
||||
<!-- string end -->
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -993,5 +993,7 @@
|
||||
<string name="add_remote_book">WebDavBook</string>
|
||||
<string name="bitmap_cache_size_summary">Current cache max size %1$s MB</string>
|
||||
<string name="bitmap_cache_size">bitmap cache size</string>
|
||||
<string name="restart_to_apply_changes">Restart to apply changes</string>
|
||||
<!-- string end -->
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -993,5 +993,7 @@
|
||||
<string name="add_remote_book">WebDavBook</string>
|
||||
<string name="bitmap_cache_size_summary">Current cache max size %1$s MB</string>
|
||||
<string name="bitmap_cache_size">bitmap cache size</string>
|
||||
<string name="restart_to_apply_changes">Restart to apply changes</string>
|
||||
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -990,6 +990,7 @@
|
||||
<string name="add_remote_book">WebDav书籍</string>
|
||||
<string name="bitmap_cache_size_summary">当前最大缓存 %1$s MB</string>
|
||||
<string name="bitmap_cache_size">图片绘制缓存</string>
|
||||
<string name="restart_to_apply_changes">重启应用更改</string>
|
||||
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -992,6 +992,7 @@
|
||||
<string name="add_remote_book">WebDav书籍</string>
|
||||
<string name="bitmap_cache_size_summary">当前最大缓存 %1$s MB</string>
|
||||
<string name="bitmap_cache_size">图片绘制缓存</string>
|
||||
<string name="restart_to_apply_changes">重启应用更改</string>
|
||||
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -992,6 +992,7 @@
|
||||
<string name="add_remote_book">WebDav书籍</string>
|
||||
<string name="bitmap_cache_size_summary">当前最大缓存 %1$s MB</string>
|
||||
<string name="bitmap_cache_size">图片绘制缓存</string>
|
||||
<string name="restart_to_apply_changes">重启应用更改</string>
|
||||
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -993,5 +993,7 @@
|
||||
<string name="add_remote_book">WebDavBook</string>
|
||||
<string name="bitmap_cache_size_summary">Current cache max size %1$s MB</string>
|
||||
<string name="bitmap_cache_size">bitmap cache size</string>
|
||||
<string name="restart_to_apply_changes">Restart to apply changes</string>
|
||||
<!-- string end -->
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user