Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions res/layout/dictionary_status_not_enabled.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" style="@style/paragraph" android:paddingHorizontal="24dp" android:gravity="center" android:text="@string/dictionaries_activity_not_enabled"/>
1 change: 1 addition & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
<string name="dictionaries_from_internet">Download a dictionary from the Internet</string>
<string name="dictionaries_download_success">Dictionary installed</string>
<string name="dictionaries_download_failed">Download failed</string>
<string name="dictionaries_activity_not_enabled">You must first enable the keyboard to download dictionaries.</string>
<string name="candidates_status_no_dict">No dictionary installed</string>
<string name="candidates_status_install">Install</string>
</resources>
3 changes: 3 additions & 0 deletions srcs/juloo.keyboard2/dict/DictionaryListView.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading