pull/49/head
kunfei 5 years ago
parent cc45123c96
commit fb32fc074e
  1. 6
      app/src/main/java/io/legado/app/ui/config/ConfigActivity.kt
  2. 2
      app/src/main/res/values/strings.xml
  3. 5
      app/src/main/res/xml/pref_config_web_dav.xml
  4. 4
      app/src/main/res/xml/pref_main.xml

@ -19,7 +19,7 @@ class ConfigActivity : VMBaseActivity<ConfigViewModel>(R.layout.activity_config)
when (viewModel.configType) { when (viewModel.configType) {
ConfigViewModel.TYPE_CONFIG -> { ConfigViewModel.TYPE_CONFIG -> {
title_bar.title = "设置" title_bar.title = getString(R.string.setting)
val fTag = "configFragment" val fTag = "configFragment"
var configFragment = supportFragmentManager.findFragmentByTag(fTag) var configFragment = supportFragmentManager.findFragmentByTag(fTag)
if (configFragment == null) configFragment = ConfigFragment() if (configFragment == null) configFragment = ConfigFragment()
@ -28,7 +28,7 @@ class ConfigActivity : VMBaseActivity<ConfigViewModel>(R.layout.activity_config)
.commit() .commit()
} }
ConfigViewModel.TYPE_THEME_CONFIG -> { ConfigViewModel.TYPE_THEME_CONFIG -> {
title_bar.title = "主题设置" title_bar.title = getString(R.string.theme_setting)
val fTag = "themeConfigFragment" val fTag = "themeConfigFragment"
var configFragment = supportFragmentManager.findFragmentByTag(fTag) var configFragment = supportFragmentManager.findFragmentByTag(fTag)
if (configFragment == null) configFragment = ThemeConfigFragment() if (configFragment == null) configFragment = ThemeConfigFragment()
@ -37,7 +37,7 @@ class ConfigActivity : VMBaseActivity<ConfigViewModel>(R.layout.activity_config)
.commit() .commit()
} }
ConfigViewModel.TYPE_WEB_DAV_CONFIG -> { ConfigViewModel.TYPE_WEB_DAV_CONFIG -> {
title_bar.title = "WebDav设置" title_bar.title = getString(R.string.backup_restore)
val fTag = "webDavFragment" val fTag = "webDavFragment"
var configFragment = supportFragmentManager.findFragmentByTag(fTag) var configFragment = supportFragmentManager.findFragmentByTag(fTag)
if (configFragment == null) configFragment = WebDavConfigFragment() if (configFragment == null) configFragment = WebDavConfigFragment()

@ -90,6 +90,8 @@
<string name="ps_auto_refresh">打开软件时自动更新书籍</string> <string name="ps_auto_refresh">打开软件时自动更新书籍</string>
<string name="pt_auto_download">自动下载最新章节</string> <string name="pt_auto_download">自动下载最新章节</string>
<string name="ps_auto_download">更新书籍时自动下载最新章节</string> <string name="ps_auto_download">更新书籍时自动下载最新章节</string>
<string name="backup_restore">备份与恢复</string>
<string name="web_dav_set_import_old">WebDav设置/导入旧版本数据</string>
<string name="backup">备份</string> <string name="backup">备份</string>
<string name="restore">恢复</string> <string name="restore">恢复</string>
<string name="backup_permission">备份请给与存储权限</string> <string name="backup_permission">备份请给与存储权限</string>

@ -30,4 +30,9 @@
android:title="恢复" android:title="恢复"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="import_old"
android:title="导入旧版本数据"
app:iconSpaceReserved="false" />
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

@ -30,8 +30,8 @@
<androidx.preference.Preference <androidx.preference.Preference
android:key="web_dav_setting" android:key="web_dav_setting"
android:summary="通过WebDav云备份" android:summary="@string/web_dav_set_import_old"
android:title="云备份设置" android:title="@string/backup_restore"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <androidx.preference.Preference

Loading…
Cancel
Save