diff options
| author | Jules Aguillon | 2025-03-27 23:25:32 +0100 |
|---|---|---|
| committer | GitHub | 2025-03-27 23:25:32 +0100 |
| commit | 6541054cce964b7243d8779b54b168cda6741aff (patch) | |
| tree | 5a065d34c23316ca25f1ad6605c688619af43b85 /srcs/juloo.keyboard2/LayoutModifier.java | |
| parent | 3971f6243cb5b5ca7f3120d5be8140f7646c9d7e (diff) | |
| download | unexpected-keyboard-6541054cce964b7243d8779b54b168cda6741aff.tar.gz unexpected-keyboard-6541054cce964b7243d8779b54b168cda6741aff.zip | |
Remove symbols from the number row by default (#964)
The number row option is changed into a ListPreference and controls whether the number row contains symbols or not.
Co-authored-by: Joey Schaff <j@jaoh.xyz>
Diffstat (limited to 'srcs/juloo.keyboard2/LayoutModifier.java')
| -rw-r--r-- | srcs/juloo.keyboard2/LayoutModifier.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/srcs/juloo.keyboard2/LayoutModifier.java b/srcs/juloo.keyboard2/LayoutModifier.java index 7be3fb6..22f15ec 100644 --- a/srcs/juloo.keyboard2/LayoutModifier.java +++ b/srcs/juloo.keyboard2/LayoutModifier.java @@ -11,7 +11,8 @@ public final class LayoutModifier { static Config globalConfig; static KeyboardData.Row bottom_row; - static KeyboardData.Row number_row; + static KeyboardData.Row number_row_no_symbols; + static KeyboardData.Row number_row_symbols; static KeyboardData num_pad; /** Update the layout according to the configuration. @@ -44,7 +45,7 @@ public final class LayoutModifier } else if (globalConfig.add_number_row && !kw.embedded_number_row) // The numpad removes the number row { - added_number_row = modify_number_row(number_row, kw); + added_number_row = modify_number_row(globalConfig.number_row_symbols ? number_row_symbols : number_row_no_symbols, kw); remove_keys.addAll(added_number_row.getKeys(0).keySet()); } // Add the bottom row before computing the extra keys @@ -204,8 +205,9 @@ public final class LayoutModifier globalConfig = globalConfig_; try { - number_row = KeyboardData.load_number_row(res); - bottom_row = KeyboardData.load_bottom_row(res); + number_row_no_symbols = KeyboardData.load_row(res, R.xml.number_row_no_symbols); + number_row_symbols = KeyboardData.load_row(res, R.xml.number_row); + bottom_row = KeyboardData.load_row(res, R.xml.bottom_row); num_pad = KeyboardData.load_num_pad(res); } catch (Exception e) |
