Reputation: 930
In my app I want to fill my EditText
by clicking Buttons; with my own keyboard. So I dont want that the keyboard opens if I click on the EditText
. Is that possible?
Upvotes: 1
Views: 128
Reputation: 735
Please try this code..EditText editText = (EditText) findViewById(R.id.edit_text)
;
editText.setInputType(0);
ORInputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
Upvotes: 3
Reputation: 109237
Either in manifest file..
<activity android:windowSoftInputMode="stateAlwaysHidden">
Or in your activity
InputMethodManager imm = (InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getApplicationWindowToken(), 0);
Upvotes: 5