mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 14:46:31 +02:00
Always show keyboard implicit
This commit is contained in:
@@ -924,34 +924,6 @@ public class Helper {
|
||||
return color;
|
||||
}
|
||||
|
||||
static void showKeyboard(final View view) {
|
||||
final InputMethodManager imm =
|
||||
(InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (imm == null)
|
||||
return;
|
||||
|
||||
if (view.hasFocus())
|
||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
||||
|
||||
final View.OnFocusChangeListener listener = view.getOnFocusChangeListener();
|
||||
|
||||
view.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (listener != null)
|
||||
listener.onFocusChange(v, hasFocus);
|
||||
|
||||
if (hasFocus)
|
||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
||||
else
|
||||
imm.toggleSoftInput(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
if (!view.hasFocus())
|
||||
view.requestFocus();
|
||||
}
|
||||
|
||||
static void hideKeyboard(final View view) {
|
||||
InputMethodManager imm =
|
||||
(InputMethodManager) view.getContext().getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
|
||||
Reference in New Issue
Block a user