Whenever I click in the EditText
the Android keyboard popup window appears, but I don\'t want the keyboard to pop up.
I want to permanently hide the and
Try to add this in yout onCreate()
method.
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
Not tested but It Should work!!
Works for all Android versions.
In your XML use the property android:textIsSelectable="true"
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
.
.
.
android:textIsSelectable="true"/>
And, in your Java class:
editText1.setShowSoftInputOnFocus(false);
In Kotlin:
editText1.showSoftInputOnFocus = false
These two line should do what you want:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
You may try to fake your EditText with a Button like this:
<Button
android:id="@+id/edit_birthday"
style="@android:style/Widget.EditText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_birthday"/>