I can\'t seem to get this work. I already set popWindow focusable as to what I read on other forums but still no luck.
xml
ha, .found the answer., just did
popWindow.setFocusable(true);
popWindow.update();
thanks for the support! credits from this topic Keyboard not shown when i click on edittextview in android?
Try adding this line before you show the popup:
popupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
Try this::
Programatically:
edittext.requestFocus();
Through xml:
<EditText
android:id="@+id/editText3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName">
<requestFocus />
</EditText>
Hope it Helps!!
This worked for me:
popWindow.setFocusable(true);
popWindow.update();
Nothing helped me, it still didn't appear on some devices, so I had to force showing it like that (kotlin):
val editText = customView.findViewById<EditText>(numberFieldId)
editText.onClick {
showKeyboard(editText, context)
}
private fun showKeyboard(mEtSearch: EditText, context: Context) {
mEtSearch.requestFocus()
val imm = context.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0)
}