Loading java/src/com/android/inputmethod/latin/LatinIME.java +17 −2 Original line number Diff line number Diff line Loading @@ -219,6 +219,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen public final UIHandler mHandler = new UIHandler(this); private ImageButton floatingButton; public static final class UIHandler extends LeakGuardHandlerWrapper<LatinIME> { private static final int MSG_UPDATE_SHIFT_STATE = 0; private static final int MSG_PENDING_IMS_CALLBACK = 1; Loading Loading @@ -881,10 +883,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mSuggestionStripView.setListener(this, view); } ImageButton floatingButton = view.findViewById(R.id.floating_button); floatingButton = view.findViewById(R.id.floating_button); if (floatingButton != null) { //if (isSetupWizardFinished() && (accountIsPremium(getApplicationContext()) || accountIsPremiumFromIME())) { if (true) { if (shouldShowFloatingButton()) { floatingButton.setVisibility(View.VISIBLE); floatingButton.setOnClickListener(new View.OnClickListener() { @Override Loading @@ -899,6 +901,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } private boolean shouldShowFloatingButton() { Log.d(TAG, ">>>shouldShowFloatingButton"); return true; } private void switchToNextInputMethod() { final IBinder token = getWindow().getWindow().getAttributes().token; InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); Loading Loading @@ -970,6 +977,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen public void onStartInputView(final EditorInfo editorInfo, final boolean restarting) { mHandler.onStartInputView(editorInfo, restarting); mStatsUtilsManager.onStartInputView(); if (floatingButton != null) { if (shouldShowFloatingButton()) { floatingButton.setVisibility(View.VISIBLE); } else { floatingButton.setVisibility(View.GONE); } } } @Override Loading Loading
java/src/com/android/inputmethod/latin/LatinIME.java +17 −2 Original line number Diff line number Diff line Loading @@ -219,6 +219,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen public final UIHandler mHandler = new UIHandler(this); private ImageButton floatingButton; public static final class UIHandler extends LeakGuardHandlerWrapper<LatinIME> { private static final int MSG_UPDATE_SHIFT_STATE = 0; private static final int MSG_PENDING_IMS_CALLBACK = 1; Loading Loading @@ -881,10 +883,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mSuggestionStripView.setListener(this, view); } ImageButton floatingButton = view.findViewById(R.id.floating_button); floatingButton = view.findViewById(R.id.floating_button); if (floatingButton != null) { //if (isSetupWizardFinished() && (accountIsPremium(getApplicationContext()) || accountIsPremiumFromIME())) { if (true) { if (shouldShowFloatingButton()) { floatingButton.setVisibility(View.VISIBLE); floatingButton.setOnClickListener(new View.OnClickListener() { @Override Loading @@ -899,6 +901,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } private boolean shouldShowFloatingButton() { Log.d(TAG, ">>>shouldShowFloatingButton"); return true; } private void switchToNextInputMethod() { final IBinder token = getWindow().getWindow().getAttributes().token; InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); Loading Loading @@ -970,6 +977,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen public void onStartInputView(final EditorInfo editorInfo, final boolean restarting) { mHandler.onStartInputView(editorInfo, restarting); mStatsUtilsManager.onStartInputView(); if (floatingButton != null) { if (shouldShowFloatingButton()) { floatingButton.setVisibility(View.VISIBLE); } else { floatingButton.setVisibility(View.GONE); } } } @Override Loading