forked from mirror/monocles_chat_clean
open keyboard on search view automatically
fixes 504
This commit is contained in:
parent
707ca555dd
commit
8c60adf17f
1 changed files with 5 additions and 3 deletions
|
@ -60,9 +60,11 @@ public class SoftKeyboardUtils {
|
|||
|
||||
public static void showKeyboard(EditText editText) {
|
||||
editText.requestFocus();
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (inputMethodManager != null) {
|
||||
inputMethodManager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
|
||||
try {
|
||||
final InputMethodManager inputMethodManager = (InputMethodManager) editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, 0);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue