Skip to content

Commit 7c4a8ce

Browse files
committed
Adjust preference screen
1 parent ba2d795 commit 7c4a8ce

File tree

3 files changed

+43
-41
lines changed

3 files changed

+43
-41
lines changed

app/src/main/res/values-zh/strings.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@
2222
<string name="entries_pref_quick_action_home">主页</string>
2323
<string name="entries_pref_quick_action_sleep">休眠</string>
2424

25-
<string name="title_pref_donate">捐赠</string>
26-
<string name="summary_pref_donate">如果你喜欢这个应用,可以考虑给我买杯咖啡。</string>
27-
28-
<string name="title_pref_disable_ads">关闭广告</string>
29-
<string name="summary_pref_disable_ads">观看和点击广告可以激励开发者做得更好,但如果你对此感到反感,可以将其关闭</string>
30-
31-
<string name="title_pref_category_fingerprint2sleep">指纹休眠</string>
32-
3325
<string name="title_pref_notify_on_error">错误时提示</string>
3426
<string name="summary_pref_notify_on_error">当指纹认证发生错误时通过 Toast 显示信息</string>
3527

@@ -41,4 +33,12 @@
4133

4234
<string name="title_pref_lock_screen_with_power_button_as_root">解决指纹解锁的问题</string>
4335
<string name="summary_pref_lock_screen_with_power_button_as_root">需要 Root。通过模拟点按电源键关闭屏幕</string>
36+
37+
<string name="title_pref_category_other">其他</string>
38+
39+
<string name="title_pref_donate">捐赠</string>
40+
<string name="summary_pref_donate">如果你喜欢这个应用,可以考虑给我买杯咖啡。</string>
41+
42+
<string name="title_pref_disable_ads">关闭广告</string>
43+
<string name="summary_pref_disable_ads">观看和点击广告可以激励开发者做得更好,但如果你对此感到反感,可以将其关闭</string>
4444
</resources>

app/src/main/res/values/strings.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@
2222
<string name="entries_pref_quick_action_home">Home</string>
2323
<string name="entries_pref_quick_action_sleep">Sleep</string>
2424

25-
<string name="title_pref_donate">Donate</string>
26-
<string name="summary_pref_donate">If you like this app, consider buying me a cup of coffee.</string>
27-
28-
<string name="title_pref_disable_ads">Disable ads</string>
29-
<string name="summary_pref_disable_ads">Watching and clicking ads can motivate developers to do better, but if you\\\'re feeling disgusted, you can close them down.</string>
30-
31-
<string name="title_pref_category_fingerprint2sleep">Fingerprint to Sleep</string>
32-
3325
<string name="title_pref_notify_on_error">Notify on error</string>
3426
<string name="summary_pref_notify_on_error">Show message on fingerprint authentication error occur via Toast</string>
3527

@@ -42,6 +34,14 @@
4234
<string name="title_pref_lock_screen_with_power_button_as_root">Work-around for Fingerprint to Unlock</string>
4335
<string name="summary_pref_lock_screen_with_power_button_as_root">Requires root. Switch off screen simulating a power button press.</string>
4436

37+
<string name="title_pref_category_other">Other</string>
38+
39+
<string name="title_pref_donate">Donate</string>
40+
<string name="summary_pref_donate">If you like this app, consider buying me a cup of coffee.</string>
41+
42+
<string name="title_pref_disable_ads">Disable ads</string>
43+
<string name="summary_pref_disable_ads">Watching and clicking ads can motivate developers to do better, but if you\\\'re feeling disgusted, you can close them down.</string>
44+
4545
<!-- AdMob -->
4646
<string name="banner_ad_unit_id" translatable="false">ca-app-pub-2250118750843932/8752209602</string>
4747
</resources>

app/src/main/res/xml/pref_settings.xml

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,47 @@
55
android:title="@string/title_pref_enable_fingerprint_quick_action" />
66

77
<ListPreference
8+
android:defaultValue="sleep"
89
android:dependency="pref_enable_fingerprint_quick_action"
910
android:entries="@array/entries_pref_quick_action"
1011
android:entryValues="@array/values_pref_quick_action"
1112
android:key="pref_quick_action"
12-
android:defaultValue="sleep"
1313
android:title="@string/title_pref_quick_action" />
1414

15-
<Preference
16-
android:key="pref_donate"
17-
android:summary="@string/summary_pref_donate"
18-
android:title="@string/title_pref_donate" />
15+
<CheckBoxPreference
16+
android:dependency="pref_enable_fingerprint_quick_action"
17+
android:key="pref_response_enrolled_fingerprint_only"
18+
android:summary="@string/summary_pref_response_enrolled_fingerprint_only"
19+
android:title="@string/title_pref_response_enrolled_fingerprint_only" />
1920

2021
<CheckBoxPreference
21-
android:key="pref_disable_ads"
22-
android:summary="@string/summary_pref_disable_ads"
23-
android:title="@string/title_pref_disable_ads" />
22+
android:dependency="pref_enable_fingerprint_quick_action"
23+
android:key="pref_notify_on_error"
24+
android:summary="@string/summary_pref_notify_on_error"
25+
android:title="@string/title_pref_notify_on_error" />
2426

25-
<PreferenceCategory
27+
<CheckBoxPreference
2628
android:dependency="pref_enable_fingerprint_quick_action"
27-
android:title="@string/title_pref_category_fingerprint2sleep">
29+
android:key="pref_foreground_service"
30+
android:summary="@string/summary_pref_foreground_service"
31+
android:title="@string/title_pref_foreground_service" />
2832

29-
<CheckBoxPreference
30-
android:key="pref_response_enrolled_fingerprint_only"
31-
android:summary="@string/summary_pref_response_enrolled_fingerprint_only"
32-
android:title="@string/title_pref_response_enrolled_fingerprint_only" />
33+
<CheckBoxPreference
34+
android:dependency="pref_enable_fingerprint_quick_action"
35+
android:key="pref_lock_screen_with_power_button_as_root"
36+
android:summary="@string/summary_pref_lock_screen_with_power_button_as_root"
37+
android:title="@string/title_pref_lock_screen_with_power_button_as_root" />
3338

34-
<CheckBoxPreference
35-
android:key="pref_notify_on_error"
36-
android:summary="@string/summary_pref_notify_on_error"
37-
android:title="@string/title_pref_notify_on_error" />
39+
<PreferenceCategory android:title="@string/title_pref_category_other">
3840

39-
<CheckBoxPreference
40-
android:key="pref_foreground_service"
41-
android:summary="@string/summary_pref_foreground_service"
42-
android:title="@string/title_pref_foreground_service" />
41+
<Preference
42+
android:key="pref_donate"
43+
android:summary="@string/summary_pref_donate"
44+
android:title="@string/title_pref_donate" />
4345

4446
<CheckBoxPreference
45-
android:key="pref_lock_screen_with_power_button_as_root"
46-
android:summary="@string/summary_pref_lock_screen_with_power_button_as_root"
47-
android:title="@string/title_pref_lock_screen_with_power_button_as_root" />
47+
android:key="pref_disable_ads"
48+
android:summary="@string/summary_pref_disable_ads"
49+
android:title="@string/title_pref_disable_ads" />
4850
</PreferenceCategory>
4951
</PreferenceScreen>

0 commit comments

Comments
 (0)