Skip to content

Commit

Permalink
[Setting] add preference ENABLE_MONET
Browse files Browse the repository at this point in the history
  • Loading branch information
chr56 committed Apr 3, 2023
1 parent b12bf12 commit 6443e23
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/player/phonograph/settings/Setting.kt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class Setting(context: Context) {
// Theme and Color

var themeString: String by StringPref(GENERAL_THEME, StyleConfig.THEME_AUTO)
var enableMonet: Boolean by BooleanPref(ENABLE_MONET, false)

// Appearance
var homeTabConfigJsonString: String by StringPref(HOME_TAB_CONFIG, "")
Expand Down Expand Up @@ -264,6 +265,7 @@ class Setting(context: Context) {

// Appearance
const val GENERAL_THEME = "general_theme"
const val ENABLE_MONET = "enable_monet"
const val HOME_TAB_CONFIG = "home_tab_config"
const val COLORED_NOTIFICATION = "colored_notification"
const val CLASSIC_NOTIFICATION = "classic_notification"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,6 @@
<string name="permission_desc_read_external_storage">读取设备中的音乐文件必须读取外部存储权限</string>
<string name="completed">完成</string>
<string name="dynamic_colors">动态颜色</string>
<string name="pref_title_enable_monet">启用 Monet 取色</string>
<string name="pref_summary_enable_monet">使用 Material You 动态主题取色 (实验性支持) \n[注: 仅修改配色, 不支持完整的 Material You]</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,6 @@
<string name="permission_desc_read_external_storage">讀取裝置中的音樂檔案必須讀取外部儲存許可權。</string>
<string name="completed">完成</string>
<string name="dynamic_colors">動態色彩</string>
<string name="pref_title_enable_monet">啟用 Monet 取色</string>
<string name="pref_summary_enable_monet">使用 Material You 動態主題取色 (實驗性支援) \n[注: 僅修改配色, 不支援完整的 Material You]</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -457,4 +457,6 @@
<string name="permission_desc_read_external_storage">Read External Storage permission is required to read music file in the device.</string>
<string name="completed">Completed</string>
<string name="dynamic_colors">Dynamic Colors</string>
<string name="pref_title_enable_monet">Enable Monet</string>
<string name="pref_summary_enable_monet">Use Material You wallpaper-based theming system. (experimental, no full Material You support)</string>
</resources>
7 changes: 7 additions & 0 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
android:title="@string/pref_title_general_theme"
app:iconSpaceReserved="false" />

<lib.phonograph.preference.SwitchPreferenceX
android:key="enable_monet"
android:defaultValue="false"
android:summary="@string/pref_summary_enable_monet"
android:title="@string/pref_title_enable_monet"
app:iconSpaceReserved="false"/>

<lib.phonograph.preference.ColorPreferenceX
android:key="primary_color"
android:persistent="false"
Expand Down

0 comments on commit 6443e23

Please sign in to comment.