I have few TextView's in my activity, when activity starts i want to show soft numeric keypad or that activity should always show keypad.
I have tried:
- To set
android:windowSoftInputMode="stateAlwaysVisible"
in manifest for activity but didn't worked. - Added this code in activity onCreate, it shows the alphanumeric keypad but not numeric.
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
Need help on this.
I have tried this for an EditText in a dynamic way...The method would be the same for TextView also..When activity starts,give focus on that textView ,so that it can show u the keypad