I am working on the Phone app in tablet mode.I want to disable the soft keypad wen we click on the edit text.Can any one please help me.. Thanks in advance.
Asked
Active
Viewed 900 times
-1
-
1http://stackoverflow.com/questions/10611833/how-to-disable-keypad-popup-when-on-edittext – JiTHiN Dec 12 '12 at 11:36
2 Answers
1
In your Manifest:
<activity android:name=".MainActivity"
android:windowSoftInputMode="stateHidden" />

Skynet
- 7,820
- 5
- 44
- 80
1
Use this for hide
InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(edit.getWindowToken(), 0);
Use this for show
InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);

Rodolfo Faquin
- 810
- 1
- 8
- 14