Skip to content

Commit

Permalink
Don't show language on spacebar if only one is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
rkkr committed Aug 4, 2019
1 parent 5394658 commit 111cd6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "rkr.simplekeyboard.inputmethod"
minSdkVersion 19
targetSdkVersion 28
versionCode 59
versionName "3.9"
versionCode 60
versionName "3.10"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import rkr.simplekeyboard.inputmethod.keyboard.internal.MoreKeySpec;
import rkr.simplekeyboard.inputmethod.keyboard.internal.NonDistinctMultitouchHelper;
import rkr.simplekeyboard.inputmethod.keyboard.internal.TimerHandler;
import rkr.simplekeyboard.inputmethod.latin.RichInputMethodManager;
import rkr.simplekeyboard.inputmethod.latin.RichInputMethodSubtype;
import rkr.simplekeyboard.inputmethod.latin.common.Constants;
import rkr.simplekeyboard.inputmethod.latin.common.CoordinateUtils;
Expand Down Expand Up @@ -605,8 +606,9 @@ protected void onDrawKeyTopVisuals(final Key key, final Canvas canvas, final Pai
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) {
// If more than one language is enabled in current input method
final RichInputMethodManager imm = RichInputMethodManager.getInstance();
if (imm.getMyEnabledInputMethodSubtypeList(false).size() > 1) {
drawLanguageOnSpacebar(key, canvas, paint);
}
}
Expand Down

0 comments on commit 111cd6b

Please sign in to comment.