Skip to content

Commit 4b46523

Browse files
authored
Merge pull request #124 from FossifyOrg/switch_to_switches
feat(ui): replace checkboxes with material switches
2 parents b9416a8 + 131be07 commit 4b46523

File tree

4 files changed

+64
-51
lines changed

4 files changed

+64
-51
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Replaced checkboxes with switches (https://github.com/orgs/FossifyOrg/discussions/78)
13+
14+
### Fixed
15+
16+
- Security label color in settings
17+
1018
## [1.1.1] - 2025-03-18
1119

1220
### Changed
21+
1322
- Minor bug fixes and improvements
1423
- Added more translations
1524

1625
### Fixed
26+
1727
- Fixed security vulnerability in app lock
1828

1929
## [1.1.0] - 2024-07-22
2030

2131
### Added
32+
2233
- Added collapsible checked items section at the bottom
2334

2435
### Changed
36+
2537
- Minor bug fixes and improvements
2638
- Added new translations
2739

2840
## [1.0.0] - 2024-04-14
2941

3042
### Added
43+
3144
- Initial release
3245

3346
[Unreleased]: https://github.com/FossifyOrg/Notes/compare/1.1.1...HEAD

app/src/main/kotlin/org/fossify/notes/activities/SettingsActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class SettingsActivity : SimpleActivity() {
133133
binding.settingsTextLabel,
134134
binding.settingsStartupLabel,
135135
binding.settingsSavingLabel,
136+
binding.settingsSecurityLabel,
136137
binding.settingsMigratingLabel,
137138
binding.settingsBackupsLabel,
138139
).forEach {

app/src/main/res/layout/activity_settings.xml

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282

8383
<RelativeLayout
8484
android:id="@+id/settings_use_english_holder"
85-
style="@style/SettingsHolderCheckboxStyle"
85+
style="@style/SettingsHolderSwitchStyle"
8686
android:layout_width="match_parent"
8787
android:layout_height="wrap_content">
8888

89-
<org.fossify.commons.views.MyAppCompatCheckbox
89+
<org.fossify.commons.views.MyMaterialSwitch
9090
android:id="@+id/settings_use_english"
91-
style="@style/SettingsCheckboxStyle"
91+
style="@style/SettingsSwitchStyle"
9292
android:layout_width="match_parent"
9393
android:layout_height="wrap_content"
9494
android:text="@string/use_english_language" />
@@ -154,13 +154,13 @@
154154

155155
<RelativeLayout
156156
android:id="@+id/settings_show_word_count_holder"
157-
style="@style/SettingsHolderCheckboxStyle"
157+
style="@style/SettingsHolderSwitchStyle"
158158
android:layout_width="match_parent"
159159
android:layout_height="wrap_content">
160160

161-
<org.fossify.commons.views.MyAppCompatCheckbox
161+
<org.fossify.commons.views.MyMaterialSwitch
162162
android:id="@+id/settings_show_word_count"
163-
style="@style/SettingsCheckboxStyle"
163+
style="@style/SettingsSwitchStyle"
164164
android:layout_width="match_parent"
165165
android:layout_height="wrap_content"
166166
android:text="@string/show_word_count" />
@@ -169,13 +169,13 @@
169169

170170
<RelativeLayout
171171
android:id="@+id/settings_clickable_links_holder"
172-
style="@style/SettingsHolderCheckboxStyle"
172+
style="@style/SettingsHolderSwitchStyle"
173173
android:layout_width="match_parent"
174174
android:layout_height="wrap_content">
175175

176-
<org.fossify.commons.views.MyAppCompatCheckbox
176+
<org.fossify.commons.views.MyMaterialSwitch
177177
android:id="@+id/settings_clickable_links"
178-
style="@style/SettingsCheckboxStyle"
178+
style="@style/SettingsSwitchStyle"
179179
android:layout_width="match_parent"
180180
android:layout_height="wrap_content"
181181
android:text="@string/links_and_emails_clickable" />
@@ -184,13 +184,13 @@
184184

185185
<RelativeLayout
186186
android:id="@+id/settings_monospaced_font_holder"
187-
style="@style/SettingsHolderCheckboxStyle"
187+
style="@style/SettingsHolderSwitchStyle"
188188
android:layout_width="match_parent"
189189
android:layout_height="wrap_content">
190190

191-
<org.fossify.commons.views.MyAppCompatCheckbox
191+
<org.fossify.commons.views.MyMaterialSwitch
192192
android:id="@+id/settings_monospaced_font"
193-
style="@style/SettingsCheckboxStyle"
193+
style="@style/SettingsSwitchStyle"
194194
android:layout_width="match_parent"
195195
android:layout_height="wrap_content"
196196
android:text="@string/monospaced_font" />
@@ -199,13 +199,13 @@
199199

200200
<RelativeLayout
201201
android:id="@+id/settings_use_incognito_mode_holder"
202-
style="@style/SettingsHolderCheckboxStyle"
202+
style="@style/SettingsHolderSwitchStyle"
203203
android:layout_width="match_parent"
204204
android:layout_height="wrap_content">
205205

206-
<org.fossify.commons.views.MyAppCompatCheckbox
206+
<org.fossify.commons.views.MyMaterialSwitch
207207
android:id="@+id/settings_use_incognito_mode"
208-
style="@style/SettingsCheckboxStyle"
208+
style="@style/SettingsSwitchStyle"
209209
android:layout_width="match_parent"
210210
android:layout_height="wrap_content"
211211
android:text="@string/use_incognito_mode" />
@@ -214,13 +214,13 @@
214214

215215
<RelativeLayout
216216
android:id="@+id/settings_enable_line_wrap_holder"
217-
style="@style/SettingsHolderCheckboxStyle"
217+
style="@style/SettingsHolderSwitchStyle"
218218
android:layout_width="match_parent"
219219
android:layout_height="wrap_content">
220220

221-
<org.fossify.commons.views.MyAppCompatCheckbox
221+
<org.fossify.commons.views.MyMaterialSwitch
222222
android:id="@+id/settings_enable_line_wrap"
223-
style="@style/SettingsCheckboxStyle"
223+
style="@style/SettingsSwitchStyle"
224224
android:layout_width="match_parent"
225225
android:layout_height="wrap_content"
226226
android:text="@string/enable_line_wrap" />
@@ -229,13 +229,13 @@
229229

230230
<RelativeLayout
231231
android:id="@+id/settings_move_undone_checklist_items_holder"
232-
style="@style/SettingsHolderCheckboxStyle"
232+
style="@style/SettingsHolderSwitchStyle"
233233
android:layout_width="match_parent"
234234
android:layout_height="wrap_content">
235235

236-
<org.fossify.commons.views.MyAppCompatCheckbox
236+
<org.fossify.commons.views.MyMaterialSwitch
237237
android:id="@+id/settings_move_undone_checklist_items"
238-
style="@style/SettingsCheckboxStyle"
238+
style="@style/SettingsSwitchStyle"
239239
android:layout_width="match_parent"
240240
android:layout_height="wrap_content"
241241
android:text="@string/move_done_checklist_items" />
@@ -278,13 +278,13 @@
278278

279279
<RelativeLayout
280280
android:id="@+id/settings_cursor_placement_holder"
281-
style="@style/SettingsHolderCheckboxStyle"
281+
style="@style/SettingsHolderSwitchStyle"
282282
android:layout_width="match_parent"
283283
android:layout_height="wrap_content">
284284

285-
<org.fossify.commons.views.MyAppCompatCheckbox
285+
<org.fossify.commons.views.MyMaterialSwitch
286286
android:id="@+id/settings_cursor_placement"
287-
style="@style/SettingsCheckboxStyle"
287+
style="@style/SettingsSwitchStyle"
288288
android:layout_width="match_parent"
289289
android:layout_height="wrap_content"
290290
android:text="@string/place_cursor_end" />
@@ -293,13 +293,13 @@
293293

294294
<RelativeLayout
295295
android:id="@+id/settings_show_keyboard_holder"
296-
style="@style/SettingsHolderCheckboxStyle"
296+
style="@style/SettingsHolderSwitchStyle"
297297
android:layout_width="match_parent"
298298
android:layout_height="wrap_content">
299299

300-
<org.fossify.commons.views.MyAppCompatCheckbox
300+
<org.fossify.commons.views.MyMaterialSwitch
301301
android:id="@+id/settings_show_keyboard"
302-
style="@style/SettingsCheckboxStyle"
302+
style="@style/SettingsSwitchStyle"
303303
android:layout_width="match_parent"
304304
android:layout_height="wrap_content"
305305
android:text="@string/show_keyboard" />
@@ -308,13 +308,13 @@
308308

309309
<RelativeLayout
310310
android:id="@+id/settings_show_note_picker_holder"
311-
style="@style/SettingsHolderCheckboxStyle"
311+
style="@style/SettingsHolderSwitchStyle"
312312
android:layout_width="match_parent"
313313
android:layout_height="wrap_content">
314314

315-
<org.fossify.commons.views.MyAppCompatCheckbox
315+
<org.fossify.commons.views.MyMaterialSwitch
316316
android:id="@+id/settings_show_note_picker"
317-
style="@style/SettingsCheckboxStyle"
317+
style="@style/SettingsSwitchStyle"
318318
android:layout_width="match_parent"
319319
android:layout_height="wrap_content"
320320
android:text="@string/show_note_picker" />
@@ -334,13 +334,13 @@
334334

335335
<RelativeLayout
336336
android:id="@+id/settings_autosave_notes_holder"
337-
style="@style/SettingsHolderCheckboxStyle"
337+
style="@style/SettingsHolderSwitchStyle"
338338
android:layout_width="match_parent"
339339
android:layout_height="wrap_content">
340340

341-
<org.fossify.commons.views.MyAppCompatCheckbox
341+
<org.fossify.commons.views.MyMaterialSwitch
342342
android:id="@+id/settings_autosave_notes"
343-
style="@style/SettingsCheckboxStyle"
343+
style="@style/SettingsSwitchStyle"
344344
android:layout_width="match_parent"
345345
android:layout_height="wrap_content"
346346
android:text="@string/autosave_notes" />
@@ -349,13 +349,13 @@
349349

350350
<RelativeLayout
351351
android:id="@+id/settings_display_success_holder"
352-
style="@style/SettingsHolderCheckboxStyle"
352+
style="@style/SettingsHolderSwitchStyle"
353353
android:layout_width="match_parent"
354354
android:layout_height="wrap_content">
355355

356-
<org.fossify.commons.views.MyAppCompatCheckbox
356+
<org.fossify.commons.views.MyMaterialSwitch
357357
android:id="@+id/settings_display_success"
358-
style="@style/SettingsCheckboxStyle"
358+
style="@style/SettingsSwitchStyle"
359359
android:layout_width="match_parent"
360360
android:layout_height="wrap_content"
361361
android:text="@string/display_success_message" />
@@ -379,13 +379,13 @@
379379

380380
<RelativeLayout
381381
android:id="@+id/settings_app_password_protection_holder"
382-
style="@style/SettingsHolderCheckboxStyle"
382+
style="@style/SettingsHolderSwitchStyle"
383383
android:layout_width="match_parent"
384384
android:layout_height="wrap_content">
385385

386-
<org.fossify.commons.views.MyAppCompatCheckbox
386+
<org.fossify.commons.views.MyMaterialSwitch
387387
android:id="@+id/settings_app_password_protection"
388-
style="@style/SettingsCheckboxStyle"
388+
style="@style/SettingsSwitchStyle"
389389
android:layout_width="match_parent"
390390
android:layout_height="wrap_content"
391391
android:text="@string/password_protect_whole_app" />
@@ -394,13 +394,13 @@
394394

395395
<RelativeLayout
396396
android:id="@+id/settings_note_deletion_password_protection_holder"
397-
style="@style/SettingsHolderCheckboxStyle"
397+
style="@style/SettingsHolderSwitchStyle"
398398
android:layout_width="match_parent"
399399
android:layout_height="wrap_content">
400400

401-
<org.fossify.commons.views.MyAppCompatCheckbox
401+
<org.fossify.commons.views.MyMaterialSwitch
402402
android:id="@+id/settings_note_deletion_password_protection"
403-
style="@style/SettingsCheckboxStyle"
403+
style="@style/SettingsSwitchStyle"
404404
android:layout_width="match_parent"
405405
android:layout_height="wrap_content"
406406
android:text="@string/password_protect_note_deletion" />
@@ -420,13 +420,13 @@
420420

421421
<RelativeLayout
422422
android:id="@+id/settings_enable_automatic_backups_holder"
423-
style="@style/SettingsHolderCheckboxStyle"
423+
style="@style/SettingsHolderSwitchStyle"
424424
android:layout_width="match_parent"
425425
android:layout_height="wrap_content">
426426

427-
<org.fossify.commons.views.MyAppCompatCheckbox
427+
<org.fossify.commons.views.MyMaterialSwitch
428428
android:id="@+id/settings_enable_automatic_backups"
429-
style="@style/SettingsCheckboxStyle"
429+
style="@style/SettingsSwitchStyle"
430430
android:layout_width="match_parent"
431431
android:layout_height="wrap_content"
432432
android:text="@string/enable_automatic_backups" />

app/src/main/res/layout/widget_config.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,16 @@
2020

2121
<RelativeLayout
2222
android:id="@+id/show_note_title_holder"
23+
style="@style/SettingsHolderSwitchStyle"
2324
android:layout_width="match_parent"
2425
android:layout_height="wrap_content"
25-
android:background="?attr/selectableItemBackground"
26-
android:padding="@dimen/activity_margin">
26+
android:background="?attr/selectableItemBackground">
2727

28-
<org.fossify.commons.views.MyAppCompatCheckbox
28+
<org.fossify.commons.views.MyMaterialSwitch
2929
android:id="@+id/show_note_title"
30+
style="@style/SettingsSwitchStyle"
3031
android:layout_width="match_parent"
3132
android:layout_height="wrap_content"
32-
android:background="@null"
33-
android:clickable="false"
34-
android:layoutDirection="rtl"
3533
android:text="@string/show_note_title"
3634
app:switchPadding="@dimen/medium_margin" />
3735

@@ -45,6 +43,7 @@
4543
android:layout_marginTop="@dimen/medium_margin"
4644
android:layout_marginBottom="@dimen/normal_margin"
4745
android:paddingStart="@dimen/activity_margin"
46+
android:paddingEnd="@dimen/activity_margin"
4847
android:text="@string/note_shown_widget" />
4948

5049
<org.fossify.commons.views.MyTextView

0 commit comments

Comments
 (0)