Skip to content

Commit 839255c

Browse files
authored
feat: reorganize options on the settings screen (#362)
1 parent 6bfa38d commit 839255c

File tree

4 files changed

+85
-58
lines changed

4 files changed

+85
-58
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
### Changed
1414
- The space bar now shows the currently selected language ([#62])
1515
- Space bar cursor control now activates immediately on swipe ([#129])
16+
- Reorganized options on the settings screen
1617

1718
## [1.7.0] - 2025-12-16
1819
### Added

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ class SettingsActivity : SimpleActivity() {
7474
arrayOf(
7575
settingsColorCustomizationSectionLabel,
7676
settingsGeneralSettingsLabel,
77-
settingsKeyboardSettingsLabel,
77+
settingsLayoutAppearanceLabel,
78+
settingsKeypressLabel,
79+
settingsTypingInputLabel,
7880
settingsClipboardSettingsLabel
7981
).forEach {
8082
it.setTextColor(getProperPrimaryColor())

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

Lines changed: 78 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<org.fossify.commons.views.PurchaseThankYouItem
7474
android:id="@+id/settings_purchase_thank_you_holder"
7575
android:layout_width="match_parent"
76-
android:layout_height="wrap_content"/>
76+
android:layout_height="wrap_content" />
7777

7878
<RelativeLayout
7979
android:id="@+id/settings_use_english_holder"
@@ -156,159 +156,181 @@
156156
layout="@layout/divider" />
157157

158158
<TextView
159-
android:id="@+id/settings_keyboard_settings_label"
159+
android:id="@+id/settings_layout_appearance_label"
160160
style="@style/SettingsSectionLabelStyle"
161161
android:layout_width="match_parent"
162162
android:layout_height="wrap_content"
163-
android:text="@string/keyboard_short" />
163+
android:text="@string/layout_and_appearance" />
164164

165165
<RelativeLayout
166-
android:id="@+id/settings_vibrate_on_keypress_holder"
166+
android:id="@+id/settings_show_key_borders_holder"
167167
style="@style/SettingsHolderSwitchStyle"
168168
android:layout_width="match_parent"
169169
android:layout_height="wrap_content">
170170

171171
<org.fossify.commons.views.MyMaterialSwitch
172-
android:id="@+id/settings_vibrate_on_keypress"
172+
android:id="@+id/settings_show_key_borders"
173173
style="@style/SettingsSwitchStyle"
174174
android:layout_width="match_parent"
175175
android:layout_height="wrap_content"
176-
android:text="@string/vibrate_on_keypress" />
177-
178-
</RelativeLayout>
179-
180-
<RelativeLayout
181-
android:id="@+id/settings_sound_on_keypress_holder"
182-
style="@style/SettingsHolderTextViewStyle"
183-
android:layout_width="match_parent"
184-
android:layout_height="wrap_content">
185-
186-
<org.fossify.commons.views.MyTextView
187-
android:id="@+id/settings_sound_on_keypress_label"
188-
style="@style/SettingsTextLabelStyle"
189-
android:layout_width="wrap_content"
190-
android:layout_height="wrap_content"
191-
android:text="@string/sound_on_keypress" />
192-
193-
<org.fossify.commons.views.MyTextView
194-
android:id="@+id/settings_sound_on_keypress"
195-
style="@style/SettingsTextValueStyle"
196-
android:layout_width="wrap_content"
197-
android:layout_height="wrap_content"
198-
android:layout_below="@+id/settings_sound_on_keypress_label" />
176+
android:text="@string/show_key_borders" />
199177

200178
</RelativeLayout>
201179

202180
<RelativeLayout
203-
android:id="@+id/settings_show_popup_on_keypress_holder"
181+
android:id="@+id/settings_show_numbers_row_holder"
204182
style="@style/SettingsHolderSwitchStyle"
205183
android:layout_width="match_parent"
206184
android:layout_height="wrap_content">
207185

208186
<org.fossify.commons.views.MyMaterialSwitch
209-
android:id="@+id/settings_show_popup_on_keypress"
187+
android:id="@+id/settings_show_numbers_row"
210188
style="@style/SettingsSwitchStyle"
211189
android:layout_width="match_parent"
212190
android:layout_height="wrap_content"
213-
android:text="@string/show_popup" />
191+
android:text="@string/show_numbers_row" />
214192

215193
</RelativeLayout>
216194

217195
<RelativeLayout
218-
android:id="@+id/settings_show_key_borders_holder"
196+
android:id="@+id/settings_show_emoji_key_holder"
219197
style="@style/SettingsHolderSwitchStyle"
220198
android:layout_width="match_parent"
221199
android:layout_height="wrap_content">
222200

223201
<org.fossify.commons.views.MyMaterialSwitch
224-
android:id="@+id/settings_show_key_borders"
202+
android:id="@+id/settings_show_emoji_key"
225203
style="@style/SettingsSwitchStyle"
226204
android:layout_width="match_parent"
227205
android:layout_height="wrap_content"
228-
android:text="@string/show_key_borders" />
206+
android:text="@string/show_emoji_key" />
229207

230208
</RelativeLayout>
231209

232210
<RelativeLayout
233-
android:id="@+id/settings_show_numbers_row_holder"
211+
android:id="@+id/settings_show_language_switch_key_holder"
234212
style="@style/SettingsHolderSwitchStyle"
235213
android:layout_width="match_parent"
236214
android:layout_height="wrap_content">
237215

238216
<org.fossify.commons.views.MyMaterialSwitch
239-
android:id="@+id/settings_show_numbers_row"
217+
android:id="@+id/settings_show_language_switch_key"
240218
style="@style/SettingsSwitchStyle"
241219
android:layout_width="match_parent"
242220
android:layout_height="wrap_content"
243-
android:text="@string/show_numbers_row" />
221+
android:text="@string/show_language_switch_key" />
244222

245223
</RelativeLayout>
246224

247225
<RelativeLayout
248-
android:id="@+id/settings_start_sentences_capitalized_holder"
249-
style="@style/SettingsHolderSwitchStyle"
226+
android:id="@+id/settings_keyboard_height_multiplier_holder"
227+
style="@style/SettingsHolderTextViewStyle"
250228
android:layout_width="match_parent"
251229
android:layout_height="wrap_content">
252230

253-
<org.fossify.commons.views.MyMaterialSwitch
254-
android:id="@+id/settings_start_sentences_capitalized"
255-
style="@style/SettingsSwitchStyle"
231+
<org.fossify.commons.views.MyTextView
232+
android:id="@+id/settings_keyboard_height_multiplier_label"
233+
style="@style/SettingsTextLabelStyle"
234+
android:layout_width="wrap_content"
235+
android:layout_height="wrap_content"
236+
android:text="@string/keyboard_height" />
237+
238+
<org.fossify.commons.views.MyTextView
239+
android:id="@+id/settings_keyboard_height_multiplier"
240+
style="@style/SettingsTextValueStyle"
256241
android:layout_width="match_parent"
257242
android:layout_height="wrap_content"
258-
android:text="@string/start_sentences_capitalized" />
243+
android:layout_below="@+id/settings_keyboard_height_multiplier_label"
244+
tools:text="@string/small" />
259245

260246
</RelativeLayout>
261247

248+
<include
249+
android:id="@+id/settings_layout_appearance_divider"
250+
layout="@layout/divider" />
251+
252+
<TextView
253+
android:id="@+id/settings_keypress_label"
254+
style="@style/SettingsSectionLabelStyle"
255+
android:layout_width="match_parent"
256+
android:layout_height="wrap_content"
257+
android:text="@string/keypress" />
258+
262259
<RelativeLayout
263-
android:id="@+id/settings_show_emoji_key_holder"
260+
android:id="@+id/settings_show_popup_on_keypress_holder"
264261
style="@style/SettingsHolderSwitchStyle"
265262
android:layout_width="match_parent"
266263
android:layout_height="wrap_content">
267264

268265
<org.fossify.commons.views.MyMaterialSwitch
269-
android:id="@+id/settings_show_emoji_key"
266+
android:id="@+id/settings_show_popup_on_keypress"
270267
style="@style/SettingsSwitchStyle"
271268
android:layout_width="match_parent"
272269
android:layout_height="wrap_content"
273-
android:text="@string/show_emoji_key" />
270+
android:text="@string/show_popup" />
274271

275272
</RelativeLayout>
276273

277274
<RelativeLayout
278-
android:id="@+id/settings_show_language_switch_key_holder"
275+
android:id="@+id/settings_vibrate_on_keypress_holder"
279276
style="@style/SettingsHolderSwitchStyle"
280277
android:layout_width="match_parent"
281278
android:layout_height="wrap_content">
282279

283280
<org.fossify.commons.views.MyMaterialSwitch
284-
android:id="@+id/settings_show_language_switch_key"
281+
android:id="@+id/settings_vibrate_on_keypress"
285282
style="@style/SettingsSwitchStyle"
286283
android:layout_width="match_parent"
287284
android:layout_height="wrap_content"
288-
android:text="@string/show_language_switch_key" />
285+
android:text="@string/vibrate_on_keypress" />
289286

290287
</RelativeLayout>
291288

292289
<RelativeLayout
293-
android:id="@+id/settings_keyboard_height_multiplier_holder"
290+
android:id="@+id/settings_sound_on_keypress_holder"
294291
style="@style/SettingsHolderTextViewStyle"
295292
android:layout_width="match_parent"
296293
android:layout_height="wrap_content">
297294

298295
<org.fossify.commons.views.MyTextView
299-
android:id="@+id/settings_keyboard_height_multiplier_label"
296+
android:id="@+id/settings_sound_on_keypress_label"
300297
style="@style/SettingsTextLabelStyle"
301298
android:layout_width="wrap_content"
302299
android:layout_height="wrap_content"
303-
android:text="@string/keyboard_height" />
300+
android:text="@string/sound_on_keypress" />
304301

305302
<org.fossify.commons.views.MyTextView
306-
android:id="@+id/settings_keyboard_height_multiplier"
303+
android:id="@+id/settings_sound_on_keypress"
307304
style="@style/SettingsTextValueStyle"
305+
android:layout_width="wrap_content"
306+
android:layout_height="wrap_content"
307+
android:layout_below="@+id/settings_sound_on_keypress_label" />
308+
309+
</RelativeLayout>
310+
311+
<include
312+
android:id="@+id/settings_keypress_divider"
313+
layout="@layout/divider" />
314+
315+
<TextView
316+
android:id="@+id/settings_typing_input_label"
317+
style="@style/SettingsSectionLabelStyle"
318+
android:layout_width="match_parent"
319+
android:layout_height="wrap_content"
320+
android:text="@string/typing_and_input" />
321+
322+
<RelativeLayout
323+
android:id="@+id/settings_start_sentences_capitalized_holder"
324+
style="@style/SettingsHolderSwitchStyle"
325+
android:layout_width="match_parent"
326+
android:layout_height="wrap_content">
327+
328+
<org.fossify.commons.views.MyMaterialSwitch
329+
android:id="@+id/settings_start_sentences_capitalized"
330+
style="@style/SettingsSwitchStyle"
308331
android:layout_width="match_parent"
309332
android:layout_height="wrap_content"
310-
android:layout_below="@+id/settings_keyboard_height_multiplier_label"
311-
tools:text="@string/small" />
333+
android:text="@string/start_sentences_capitalized" />
312334

313335
</RelativeLayout>
314336

@@ -336,10 +358,9 @@
336358
</RelativeLayout>
337359

338360
<include
339-
android:id="@+id/settings_keyboard_divider"
361+
android:id="@+id/settings_typing_input_divider"
340362
layout="@layout/divider" />
341363

342-
<!-- CLIPBOARD SETTINGS -->
343364
<TextView
344365
android:id="@+id/settings_clipboard_settings_label"
345366
style="@style/SettingsSectionLabelStyle"

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<string name="keycode_enter">Enter</string>
2929
<string name="keycode_space">Spacebar</string>
3030
<!-- Settings -->
31+
<string name="layout_and_appearance">Layout &amp; appearance</string>
32+
<string name="keypress">Keypress</string>
33+
<string name="typing_and_input">Typing &amp; input</string>
3134
<string name="show_clipboard_content">Show clipboard content if available</string>
3235
<string name="show_popup">Show a popup on keypress</string>
3336
<string name="vibrate_on_keypress">Vibrate on keypress</string>

0 commit comments

Comments
 (0)