How To Open Keyboard On Button Click In Android?
How can I open Keyboard on Button click in android? What I want to be like this:
Solution 1:
Please try this
InputMethodManagerimm= (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
Solution 2:
InputMethodManagerimm= (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(view, flags)
an example may be:
InputMethodManagerimm= (InputMethodManager) RouteMapActivity.this
.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(mapView, InputMethodManager.SHOW_IMPLICIT);
Post a Comment for "How To Open Keyboard On Button Click In Android?"