diff --git a/java/res/values/strings-uix.xml b/java/res/values/strings-uix.xml index cda9edbc50375681b9aeff4f6d3e8784fbf6ef26..0656f823bd7eff59879a0bf0e2de4c0d24ed1a30 100644 --- a/java/res/values/strings-uix.xml +++ b/java/res/values/strings-uix.xml @@ -42,4 +42,5 @@ <string name="disable_emoji">Disable emoji suggestions</string> <string name="try_typing">Try typing here…</string> <string name="externally_imported_model">Externally imported model</string> + <string name="spacebar_default_text">Pre-Alpha</string> </resources> \ No newline at end of file diff --git a/java/src/org/futo/inputmethod/keyboard/MainKeyboardView.java b/java/src/org/futo/inputmethod/keyboard/MainKeyboardView.java index c62adf8ce0f74a8783f6e4883d920815f168a141..16bd76ab2d15455017b17ea263e837d1dcc4fe0d 100644 --- a/java/src/org/futo/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/org/futo/inputmethod/keyboard/MainKeyboardView.java @@ -815,10 +815,7 @@ public final class MainKeyboardView extends KeyboardView implements DrawingProxy super.onDrawKeyTopVisuals(key, canvas, paint, params); final int code = key.getCode(); if (code == Constants.CODE_SPACE) { - // If input language are explicitly selected. - if (mLanguageOnSpacebarFormatType != LanguageOnSpacebarUtils.FORMAT_TYPE_NONE) { - drawLanguageOnSpacebar(key, canvas, paint); - } + drawLanguageOnSpacebar(key, canvas, paint); // Whether space key needs to show the "..." popup hint for special purposes if (key.isLongPressEnabled() && mHasMultipleEnabledIMEsOrSubtypes) { drawKeyPopupHint(key, canvas, paint, params); @@ -848,6 +845,12 @@ public final class MainKeyboardView extends KeyboardView implements DrawingProxy // Layout language name on spacebar. private String layoutLanguageOnSpacebar(final Paint paint, final RichInputMethodSubtype subtype, final int width) { + if (mLanguageOnSpacebarFormatType == LanguageOnSpacebarUtils.FORMAT_TYPE_NONE) { + final String text = getContext().getString(R.string.spacebar_default_text); + if(fitsTextIntoWidth(width, text, paint)) { + return text; + } + } // Choose appropriate language name to fit into the width. if (mLanguageOnSpacebarFormatType == LanguageOnSpacebarUtils.FORMAT_TYPE_FULL_LOCALE) { final String fullText = subtype.getFullDisplayName();