Skip to content

Commit 71cb6c7

Browse files
authored
Merge pull request #3763 from Navid200/Navid_2024_11_08
SwitchPreference switchTextOff and On
2 parents eb920d2 + ef6ba70 commit 71cb6c7

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed

app/src/main/res/xml/pref_advanced_settings.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
android:dependency="force_wearG5"
4141
android:key="disable_wearG5_on_missedreadings"
4242
android:summary="@string/pref_summary_disable_wearG5_on_missedreadings"
43+
android:switchTextOff="@string/short_off_text_for_switches"
44+
android:switchTextOn="@string/short_on_text_for_switches"
4345
android:title="@string/pref_disable_wearG5_on_missedreadings" />
4446
<EditTextPreference
4547
android:defaultValue="30"
@@ -330,6 +332,8 @@
330332
android:dependency="bluejay_enabled"
331333
android:key="bluejay_send_alarms"
332334
android:summary="Send xDrip generated alarms to the watch"
335+
android:switchTextOff="@string/short_off_text_for_switches"
336+
android:switchTextOn="@string/short_on_text_for_switches"
333337
android:title="Send Alarms" />
334338
<CheckBoxPreference
335339
android:defaultValue="false"
@@ -366,6 +370,8 @@
366370
android:dependency="bluejay_enabled"
367371
android:key="bluejay_use_motion_wake"
368372
android:summary="Use a shake of the wrist to wake BlueJay. Adjust sensitivity below."
373+
android:switchTextOff="@string/short_off_text_for_switches"
374+
android:switchTextOn="@string/short_on_text_for_switches"
369375
android:title="Wake with motion" />
370376

371377
<SeekBarPreference
@@ -505,6 +511,8 @@
505511
android:dependency="lefun_enabled"
506512
android:key="lefun_send_alarms"
507513
android:summary="@string/summary_lefun_send_alarms"
514+
android:switchTextOff="@string/short_off_text_for_switches"
515+
android:switchTextOn="@string/short_on_text_for_switches"
508516
android:title="@string/title_lefun_send_alarms" />
509517
<CheckBoxPreference
510518
android:defaultValue="true"
@@ -568,6 +576,8 @@
568576
android:defaultValue="false"
569577
android:key="miband_enabled"
570578
android:summary="@string/summary_miband_enable"
579+
android:switchTextOff="@string/short_off_text_for_switches"
580+
android:switchTextOn="@string/short_on_text_for_switches"
571581
android:title="@string/title_miband_enable" />
572582
<EditTextPreference
573583
android:key="miband_data_mac"
@@ -584,23 +594,31 @@
584594
android:dependency="miband_enabled"
585595
android:key="miband_send_readings"
586596
android:summary="@string/summary_lefun_send_readings"
597+
android:switchTextOff="@string/short_off_text_for_switches"
598+
android:switchTextOn="@string/short_on_text_for_switches"
587599
android:title="@string/title_lefun_send_readings" />
588600
<SwitchPreference
589601
android:defaultValue="true"
590602
android:dependency="miband_send_readings"
591603
android:key="miband_send_readings_as_notification"
592604
android:summary="@string/summary_miband_send_readings_as_notification"
605+
android:switchTextOff="@string/short_off_text_for_switches"
606+
android:switchTextOn="@string/short_on_text_for_switches"
593607
android:title="@string/title_miband_send_readings_as_notification" />
594608
<SwitchPreference
595609
android:defaultValue="true"
596610
android:dependency="miband_send_readings"
597611
android:key="miband_vibrate_on_readings"
612+
android:switchTextOff="@string/short_off_text_for_switches"
613+
android:switchTextOn="@string/short_on_text_for_switches"
598614
android:title="@string/title_miband_vibrate_on_readings" />
599615
<SwitchPreference
600616
android:defaultValue="true"
601617
android:dependency="miband_enabled"
602618
android:key="miband_send_alarms"
603619
android:summary="@string/summary_lefun_send_alarms"
620+
android:switchTextOff="@string/short_off_text_for_switches"
621+
android:switchTextOn="@string/short_on_text_for_switches"
604622
android:title="@string/title_lefun_send_alarms" />
605623
<CheckBoxPreference
606624
android:defaultValue="false"
@@ -645,10 +663,14 @@
645663
<SwitchPreference
646664
android:defaultValue="true"
647665
android:key="miband_feature_lift_to_wake"
666+
android:switchTextOff="@string/short_off_text_for_switches"
667+
android:switchTextOn="@string/short_on_text_for_switches"
648668
android:title="@string/title_lefun_feature_lift_to_wak" />
649669
<SwitchPreference
650670
android:defaultValue="true"
651671
android:key="miband_feature_switch_display_on_wrist"
672+
android:switchTextOff="@string/short_off_text_for_switches"
673+
android:switchTextOn="@string/short_on_text_for_switches"
652674
android:title="@string/title_miband_switch_display_on_wrist" />
653675
<SwitchPreference
654676
android:defaultValue="true"
@@ -661,23 +683,33 @@
661683
android:defaultValue="true"
662684
android:key="miband_feature_goal_notification"
663685
android:summary="@string/summary_miband_goal_notification"
686+
android:switchTextOff="@string/short_off_text_for_switches"
687+
android:switchTextOn="@string/short_on_text_for_switches"
664688
android:title="@string/title_miband_goal_notification" />
665689
<SwitchPreference
666690
android:key="miband_feature_anti_lost"
691+
android:switchTextOff="@string/short_off_text_for_switches"
692+
android:switchTextOn="@string/short_on_text_for_switches"
667693
android:title="@string/title_lefun_feature_anti_lost" />
668694
<SwitchPreference
669695
android:defaultValue="true"
670696
android:key="miband_feature_locale_24_hour"
671697
android:summary="@string/summary_miband_locale_24_hour"
698+
android:switchTextOff="@string/short_off_text_for_switches"
699+
android:switchTextOn="@string/short_on_text_for_switches"
672700
android:title="@string/title_miband_locale_24_hour" />
673701
<SwitchPreference
674702
android:defaultValue="true"
675703
android:key="miband_feature_show_date"
704+
android:switchTextOff="@string/short_off_text_for_switches"
705+
android:switchTextOn="@string/short_on_text_for_switches"
676706
android:title="@string/title_miband_show_date" />
677707
<SwitchPreference
678708
android:defaultValue="true"
679709
android:key="miband_feature_visibility"
680710
android:summary="@string/summary_miband_visibility"
711+
android:switchTextOff="@string/short_off_text_for_switches"
712+
android:switchTextOn="@string/short_on_text_for_switches"
681713
android:title="@string/title_miband_visibility" />
682714
</PreferenceCategory>
683715
<PreferenceCategory
@@ -687,6 +719,8 @@
687719
android:defaultValue="false"
688720
android:key="miband_nightmode_enabled"
689721
android:summary="@string/summary_miband_nightmode_enabled"
722+
android:switchTextOff="@string/short_off_text_for_switches"
723+
android:switchTextOn="@string/short_on_text_for_switches"
690724
android:title="@string/title_miband_nightmode_enabled" />
691725
<com.eveningoutpost.dexdrip.utils.TimePreference
692726
android:key="miband_nightmode_start"
@@ -1030,16 +1064,22 @@
10301064
android:key="health_connect_enable"
10311065
android:title="@string/use_health_connect"
10321066
android:summary="@string/requires_android_8_and_google_companion_application_or_android_14"
1067+
android:switchTextOff="@string/short_off_text_for_switches"
1068+
android:switchTextOn="@string/short_on_text_for_switches"
10331069
/>
10341070
<SwitchPreference
10351071
android:key="health_connect_receive"
10361072
android:defaultValue="true"
10371073
android:summary="@string/get_data_from_health_connect"
1074+
android:switchTextOff="@string/short_off_text_for_switches"
1075+
android:switchTextOn="@string/short_on_text_for_switches"
10381076
android:dependency="health_connect_enable"
10391077
/>
10401078
<SwitchPreference
10411079
android:key="health_connect_send"
10421080
android:summary="@string/send_data_to_health_connect"
1081+
android:switchTextOff="@string/short_off_text_for_switches"
1082+
android:switchTextOn="@string/short_on_text_for_switches"
10431083
android:dependency="health_connect_enable"
10441084
/>
10451085
<Preference
@@ -1379,6 +1419,8 @@
13791419
android:defaultValue="false"
13801420
android:key="blueReader_turn_off"
13811421
android:summary="@string/bluereader_turnoff_sum"
1422+
android:switchTextOff="@string/short_off_text_for_switches"
1423+
android:switchTextOn="@string/short_on_text_for_switches"
13821424
android:title="@string/bluereader_turnoff" />
13831425
<SeekBarPreference
13841426
android:defaultValue="5"
@@ -1392,11 +1434,15 @@
13921434
android:defaultValue="false"
13931435
android:key="blueReader_suppressuglystatemsg"
13941436
android:summary="@string/summary_Suppress_the_ugly_state_message_if_Problem_appears"
1437+
android:switchTextOff="@string/short_off_text_for_switches"
1438+
android:switchTextOn="@string/short_on_text_for_switches"
13951439
android:title="@string/title_supress_ugly_state_message" />
13961440
<SwitchPreference
13971441
android:defaultValue="false"
13981442
android:key="blueReader_writebatterylog"
13991443
android:summary="@string/summary_write_Battery_Information_for_additional_analytic"
1444+
android:switchTextOff="@string/short_off_text_for_switches"
1445+
android:switchTextOn="@string/short_on_text_for_switches"
14001446
android:title="@string/title_Batterylog" />
14011447
</PreferenceScreen>
14021448

@@ -1407,11 +1453,15 @@
14071453
android:defaultValue="false"
14081454
android:key="Libre2_showRawGraph"
14091455
android:summary="@string/summary_Lib2_show_raw_values"
1456+
android:switchTextOff="@string/short_off_text_for_switches"
1457+
android:switchTextOn="@string/short_on_text_for_switches"
14101458
android:title="@string/title_Lib2_show_raw_values" />
14111459
<SwitchPreference
14121460
android:defaultValue="false"
14131461
android:key="Libre2_showSensors"
14141462
android:summary="@string/summary_Lib2_show_sense_on_status"
1463+
android:switchTextOff="@string/short_off_text_for_switches"
1464+
android:switchTextOn="@string/short_on_text_for_switches"
14151465
android:title="@string/title_Lib2_show_sense_on_status" />
14161466
</PreferenceScreen>
14171467

app/src/main/res/xml/pref_data_source.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989
android:defaultValue="false"
9090
android:key="use_nfc_scan"
9191
android:summary="@string/allow_sensor_scanning"
92+
android:switchTextOff="@string/short_off_text_for_switches"
93+
android:switchTextOn="@string/short_on_text_for_switches"
9294
android:title="@string/use_nfc_feature" />
9395
<ListPreference
9496
android:defaultValue="enable_streaming_ask"
@@ -205,6 +207,8 @@
205207
android:dependency="nsfollow_download_treatments"
206208
android:key="cloud_storage_api_skip_download_from_xdrip"
207209
android:summary="@string/summary_cloud_storage_api_download_from_xdrip"
210+
android:switchTextOff="@string/short_off_text_for_switches"
211+
android:switchTextOn="@string/short_on_text_for_switches"
208212
android:title="@string/title_cloud_storage_api_download_from_xdrip" />
209213
</PreferenceScreen>
210214
<ListPreference

app/src/main/res/xml/pref_data_sync.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
android:disableDependentsState="false"
3636
android:key="cloud_storage_api_enable"
3737
android:summary="@string/pref_summary_api_enabled"
38+
android:switchTextOff="@string/short_off_text_for_switches"
39+
android:switchTextOn="@string/short_on_text_for_switches"
3840
android:title="@string/pref_title_api_enabled" />
3941
<CheckBoxPreference
4042
android:defaultValue="true"
@@ -46,6 +48,8 @@
4648
android:dependency="cloud_storage_api_enable"
4749
android:key="cloud_storage_api_use_best_glucose"
4850
android:summary="@string/use_plugins_for_brodcast"
51+
android:switchTextOff="@string/short_off_text_for_switches"
52+
android:switchTextOn="@string/short_on_text_for_switches"
4953
android:title="@string/send_display_glucose" />
5054
<EditTextPreference
5155
android:defaultValue="@string/pref_default_api_url"
@@ -65,12 +69,16 @@
6569
android:dependency="cloud_storage_api_enable"
6670
android:key="cloud_storage_api_download_enable"
6771
android:summary="@string/summary_cloud_storage_api_download_enable"
72+
android:switchTextOff="@string/short_off_text_for_switches"
73+
android:switchTextOn="@string/short_on_text_for_switches"
6874
android:title="@string/title_cloud_storage_api_download_enable" />
6975
<SwitchPreference
7076
android:defaultValue="true"
7177
android:dependency="cloud_storage_api_download_enable"
7278
android:key="cloud_storage_api_skip_download_from_xdrip"
7379
android:summary="@string/summary_cloud_storage_api_download_from_xdrip"
80+
android:switchTextOff="@string/short_off_text_for_switches"
81+
android:switchTextOn="@string/short_on_text_for_switches"
7482
android:title="@string/title_cloud_storage_api_download_from_xdrip" />
7583
</PreferenceScreen>
7684
<CheckBoxPreference
@@ -132,6 +140,8 @@
132140
<SwitchPreference
133141
android:defaultValue="false"
134142
android:key="cloud_storage_mongodb_enable"
143+
android:switchTextOff="@string/short_off_text_for_switches"
144+
android:switchTextOn="@string/short_on_text_for_switches"
135145
android:title="@string/enable_mongo_sync" />
136146
<EditTextPreference
137147
android:defaultValue="@string/pref_default_mongodb_uri"
@@ -178,6 +188,8 @@
178188
<SwitchPreference
179189
android:defaultValue="false"
180190
android:key="cloud_storage_influxdb_enable"
191+
android:switchTextOff="@string/short_off_text_for_switches"
192+
android:switchTextOn="@string/short_on_text_for_switches"
181193
android:title="@string/influxdb_sync" />
182194
<EditTextPreference
183195
android:defaultValue="@string/pref_default_influxdb_uri"

0 commit comments

Comments
 (0)