diff --git a/res/layout/dictionary_status_not_enabled.xml b/res/layout/dictionary_status_not_enabled.xml new file mode 100644 index 000000000..7c9984dc0 --- /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 7cc8d1d66..5eb4e85cc 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 465d373bd..345a80010 100644 --- a/srcs/juloo.keyboard2/dict/DictionaryListView.java +++ b/srcs/juloo.keyboard2/dict/DictionaryListView.java @@ -54,6 +54,9 @@ void inflate_views(Context ctx) } } 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