From 77c4a27c4c37b3620defcab94ffd1b2f536c88cb Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 2 Feb 2026 00:20:00 +0100 Subject: Spell checking (#1137) This adds dictionary-based spell checking to the keyboard. The keyboard looks at the word being typed and matches it against a dictionary to either complete the rest of the word or find alternative spellings. The core of this feature is implemented in cdict, which is included as a submodule in vendor/cidct. Cdict is developped at https://github.com/Julow/cdict The dictionaries are hosted at https://github.com/Julow/Unexpected-Keyboard-dictionaries/ The wordlists used to build the dictionaries are the same ones used by HeliBoard from https://codeberg.org/Helium314/aosp-dictionaries - Add an activity accessible from the launcher app that lists available dictionaries with a download button. The DictionaryListView view shows the list of available dictionaries and handles downloading and installing them. - The Dictionaries class manages installed dictionaries. Dictionaries are installed as individual files into the app's private directory. - Available dictionaries are listed in dictionaries.xml, which is generated when building Unexpected-Keyboard-dictionaries. method.xml mentions the dictionary name for each locales. --- res/drawable/ic_delete.xml | 2 +- res/drawable/ic_download.xml | 2 + res/layout/candidates_status_no_dict.xml | 2 +- res/layout/dictionaries_activity.xml | 7 + res/layout/dictionary_download_item.xml | 6 + res/layout/launcher_activity.xml | 1 + res/values/dictionaries.xml | 237 +++++++++++++++++++++++++++++++ res/values/strings.xml | 4 + res/values/styles.xml | 33 ++++- res/xml/method.xml | 134 ++++++++--------- 10 files changed, 358 insertions(+), 70 deletions(-) create mode 100644 res/drawable/ic_download.xml create mode 100644 res/layout/dictionaries_activity.xml create mode 100644 res/layout/dictionary_download_item.xml create mode 100644 res/values/dictionaries.xml (limited to 'res') diff --git a/res/drawable/ic_delete.xml b/res/drawable/ic_delete.xml index 5b69d0b..08a5f71 100644 --- a/res/drawable/ic_delete.xml +++ b/res/drawable/ic_delete.xml @@ -1 +1 @@ - \ No newline at end of file + diff --git a/res/drawable/ic_download.xml b/res/drawable/ic_download.xml new file mode 100644 index 0000000..1fb7e98 --- /dev/null +++ b/res/drawable/ic_download.xml @@ -0,0 +1,2 @@ + + diff --git a/res/layout/candidates_status_no_dict.xml b/res/layout/candidates_status_no_dict.xml index 6ba20b9..8bd1e37 100644 --- a/res/layout/candidates_status_no_dict.xml +++ b/res/layout/candidates_status_no_dict.xml @@ -1,5 +1,5 @@ -