In my application, I am trying to display a numeric keypad when a user clicks a button.
When the button is pressed, I move the focus to EditText in my layout using requestFocus (), and then I need to display the numeric keypad so that the user can enter values.
Values will always be numeric, and so I need to show only the numeric keypad.
I'm tired of using this inside my onClick () button, but this does not work.
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
Please provide me some solution.
In addition, my application is designed for an Android tablet that supports 4.0.3.
android buttonclick
Swayam Jun 21 '12 at 9:05 2012-06-21 09:05
source share