添加保存分享主题

pull/363/head
gedoor 4 years ago
parent f7f7faf28b
commit 64dcc81a8e
  1. 4
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt
  2. 4
      app/src/main/res/values-zh-rHK/strings.xml
  3. 4
      app/src/main/res/values-zh-rTW/strings.xml
  4. 4
      app/src/main/res/values-zh/strings.xml
  5. 4
      app/src/main/res/values/strings.xml
  6. 30
      app/src/main/res/xml/pref_config_theme.xml

@ -166,6 +166,10 @@ class ThemeConfigFragment : BasePreferenceFragment(),
AppConfig.elevation = it AppConfig.elevation = it
recreateActivities() recreateActivities()
} }
"saveDayTheme" -> {
}
"saveNightTheme" -> {
}
} }
return super.onPreferenceTreeClick(preference) return super.onPreferenceTreeClick(preference)
} }

@ -445,8 +445,6 @@
<string name="theme">主題</string> <string name="theme">主題</string>
<string name="theme_mode">主題模式</string> <string name="theme_mode">主題模式</string>
<string name="theme_mode_desc">選擇主題模式</string> <string name="theme_mode_desc">選擇主題模式</string>
<string name="default_theme">默認主題</string>
<string name="restore_default_theme">恢復主題為默認配色</string>
<string name="join_qq_group">加入QQ羣</string> <string name="join_qq_group">加入QQ羣</string>
<string name="bg_image_per">獲取背景圖片需存儲權限</string> <string name="bg_image_per">獲取背景圖片需存儲權限</string>
<string name="input_book_source_url">輸入書源網址</string> <string name="input_book_source_url">輸入書源網址</string>
@ -758,4 +756,6 @@
<string name="save_theme_config">保存主题配置</string> <string name="save_theme_config">保存主题配置</string>
<string name="save_day_theme_summary">保存白天主题配置以共调用和分享</string> <string name="save_day_theme_summary">保存白天主题配置以共调用和分享</string>
<string name="save_night_theme_summary">保存夜间主题配置以共调用和分享</string> <string name="save_night_theme_summary">保存夜间主题配置以共调用和分享</string>
<string name="theme_list">主题列表</string>
<string name="theme_list_summary">使用保存主题,导入,分享主题</string>
</resources> </resources>

@ -446,8 +446,6 @@
<string name="theme">主題</string> <string name="theme">主題</string>
<string name="theme_mode">主題模式</string> <string name="theme_mode">主題模式</string>
<string name="theme_mode_desc">選擇主題模式</string> <string name="theme_mode_desc">選擇主題模式</string>
<string name="default_theme">預設主題</string>
<string name="restore_default_theme">復原主題為預設配色</string>
<string name="join_qq_group">加入QQ群</string> <string name="join_qq_group">加入QQ群</string>
<string name="bg_image_per">獲取背景圖片需儲存權限</string> <string name="bg_image_per">獲取背景圖片需儲存權限</string>
<string name="input_book_source_url">輸入書源網址</string> <string name="input_book_source_url">輸入書源網址</string>
@ -758,5 +756,7 @@
<string name="save_theme_config">保存主题配置</string> <string name="save_theme_config">保存主题配置</string>
<string name="save_day_theme_summary">保存白天主题配置以共调用和分享</string> <string name="save_day_theme_summary">保存白天主题配置以共调用和分享</string>
<string name="save_night_theme_summary">保存夜间主题配置以共调用和分享</string> <string name="save_night_theme_summary">保存夜间主题配置以共调用和分享</string>
<string name="theme_list">主题列表</string>
<string name="theme_list_summary">使用保存主题,导入,分享主题</string>
</resources> </resources>

@ -448,8 +448,6 @@
<string name="theme">主题</string> <string name="theme">主题</string>
<string name="theme_mode">主题模式</string> <string name="theme_mode">主题模式</string>
<string name="theme_mode_desc">选择主题模式</string> <string name="theme_mode_desc">选择主题模式</string>
<string name="default_theme">默认主题</string>
<string name="restore_default_theme">恢复主题为默认配色</string>
<string name="join_qq_group">加入QQ群</string> <string name="join_qq_group">加入QQ群</string>
<string name="bg_image_per">获取背景图片需存储权限</string> <string name="bg_image_per">获取背景图片需存储权限</string>
<string name="input_book_source_url">输入书源网址</string> <string name="input_book_source_url">输入书源网址</string>
@ -758,4 +756,6 @@
<string name="save_theme_config">保存主题配置</string> <string name="save_theme_config">保存主题配置</string>
<string name="save_day_theme_summary">保存白天主题配置以共调用和分享</string> <string name="save_day_theme_summary">保存白天主题配置以共调用和分享</string>
<string name="save_night_theme_summary">保存夜间主题配置以共调用和分享</string> <string name="save_night_theme_summary">保存夜间主题配置以共调用和分享</string>
<string name="theme_list">主题列表</string>
<string name="theme_list_summary">使用保存主题,导入,分享主题</string>
</resources> </resources>

@ -450,8 +450,6 @@
<string name="theme">Theme</string> <string name="theme">Theme</string>
<string name="theme_mode">Theme mode</string> <string name="theme_mode">Theme mode</string>
<string name="theme_mode_desc">Select a theme you want</string> <string name="theme_mode_desc">Select a theme you want</string>
<string name="default_theme">Default theme</string>
<string name="restore_default_theme">Restore theme to default color</string>
<string name="join_qq_group">Join QQ group</string> <string name="join_qq_group">Join QQ group</string>
<string name="bg_image_per">Set the background image requires storage permission</string> <string name="bg_image_per">Set the background image requires storage permission</string>
<string name="input_book_source_url">Input book source address</string> <string name="input_book_source_url">Input book source address</string>
@ -759,5 +757,7 @@
<string name="save_theme_config">保存主题配置</string> <string name="save_theme_config">保存主题配置</string>
<string name="save_day_theme_summary">保存白天主题配置以共调用和分享</string> <string name="save_day_theme_summary">保存白天主题配置以共调用和分享</string>
<string name="save_night_theme_summary">保存夜间主题配置以共调用和分享</string> <string name="save_night_theme_summary">保存夜间主题配置以共调用和分享</string>
<string name="theme_list">主题列表</string>
<string name="theme_list_summary">使用保存主题,导入,分享主题</string>
</resources> </resources>

@ -4,13 +4,13 @@
<io.legado.app.ui.widget.prefs.IconListPreference <io.legado.app.ui.widget.prefs.IconListPreference
android:defaultValue="ic_launcher" android:defaultValue="ic_launcher"
android:entries="@array/icon_names"
android:entryValues="@array/icons"
android:key="launcherIcon" android:key="launcherIcon"
android:title="@string/change_icon"
android:summary="@string/change_icon_summary" android:summary="@string/change_icon_summary"
android:entryValues="@array/icons" android:title="@string/change_icon"
android:entries="@array/icon_names" app:iconSpaceReserved="false"
app:icons="@array/icons" app:icons="@array/icons" />
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true" android:defaultValue="true"
@ -34,19 +34,19 @@
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="defaultTheme" android:key="themeList"
android:summary="@string/restore_default_theme" android:summary="@string/theme_list_summary"
android:title="@string/default_theme" android:title="@string/theme_list"
app:allowDividerAbove="false" app:allowDividerAbove="false"
app:allowDividerBelow="false" app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/day" android:title="@string/day"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true" app:allowDividerAbove="true"
app:allowDividerBelow="false" app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false"
app:layout="@layout/view_preference_category">
<io.legado.app.ui.widget.prefs.ColorPreference <io.legado.app.ui.widget.prefs.ColorPreference
android:defaultValue="@color/md_light_blue_600" android:defaultValue="@color/md_light_blue_600"
@ -77,15 +77,15 @@
android:key="colorBottomBackground" android:key="colorBottomBackground"
android:summary="@string/day_navbar_color" android:summary="@string/day_navbar_color"
android:title="@string/navbar_color" android:title="@string/navbar_color"
app:cpv_dialogType="preset"
app:allowDividerAbove="false" app:allowDividerAbove="false"
app:allowDividerBelow="false" app:allowDividerBelow="false"
app:cpv_dialogType="preset"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="saveDayTheme" android:key="saveDayTheme"
android:title="@string/save_theme_config"
android:summary="@string/save_day_theme_summary" android:summary="@string/save_day_theme_summary"
android:title="@string/save_theme_config"
app:allowDividerAbove="false" app:allowDividerAbove="false"
app:allowDividerBelow="false" app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
@ -94,10 +94,10 @@
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/night" android:title="@string/night"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true" app:allowDividerAbove="true"
app:allowDividerBelow="false" app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false"
app:layout="@layout/view_preference_category">
<io.legado.app.ui.widget.prefs.ColorPreference <io.legado.app.ui.widget.prefs.ColorPreference
android:defaultValue="@color/md_grey_900" android:defaultValue="@color/md_grey_900"
@ -133,8 +133,8 @@
<io.legado.app.ui.widget.prefs.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="saveNightTheme" android:key="saveNightTheme"
android:title="@string/save_theme_config"
android:summary="@string/save_night_theme_summary" android:summary="@string/save_night_theme_summary"
android:title="@string/save_theme_config"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>

Loading…
Cancel
Save