From 7bd9306a9f787d3222691f46d03e38f86ec87c9c Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 10 Apr 2026 19:03:37 +0200 Subject: Dictionary activity: Status message when the keyboard is not enabled (#1228) This shows a reason why the list is empty and removes confusion.--- res/layout/dictionary_status_not_enabled.xml | 2 ++ res/values/strings.xml | 1 + srcs/juloo.keyboard2/dict/DictionaryListView.java | 3 +++ 3 files changed, 6 insertions(+) create mode 100644 res/layout/dictionary_status_not_enabled.xml diff --git a/res/layout/dictionary_status_not_enabled.xml b/res/layout/dictionary_status_not_enabled.xml new file mode 100644 index 0000000..7c9984d --- /dev/null +++ b/res/layout/dictionary_status_not_enabled.xml @@ -0,0 +1,2 @@ + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 7cc8d1d..5eb4e85 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -160,6 +160,7 @@ Download a dictionary from the Internet Dictionary installed Download failed + You must first enable the keyboard to download dictionaries. No dictionary installed Install diff --git a/srcs/juloo.keyboard2/dict/DictionaryListView.java b/srcs/juloo.keyboard2/dict/DictionaryListView.java index 465d373..345a800 100644 --- a/srcs/juloo.keyboard2/dict/DictionaryListView.java +++ b/srcs/juloo.keyboard2/dict/DictionaryListView.java @@ -54,6 +54,9 @@ public class DictionaryListView extends LinearLayout } } refresh(); + // The keyboard is not enabled and the list is empty, show a message. + if (locales.installed.size() == 0) + addView(View.inflate(ctx, R.layout.dictionary_status_not_enabled, null)); } /** Update the "installed" status of item views. Meaning whether the -- cgit v1.2.3