I know that there are many similar questions here, but I could not get any of the provided solutions working in a simple example application.
The problem occurs when the first page of the softkeyboard is displayed. Once this is shown, just clicking editText again makes it editable.
Tried the following:
android:windowSoftInputMode="adjustPan|adjustResize"
This is not a solution to any problems. This line seems to be required to resize the activity after the tooltip appears. Unfortunately, this also causes any EditTexts to lose focus. This is probably for the ListView that got the focus after the resize process. So I tried the following workaround:
listView.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
This always invokes the first visible EditText that contains the ListView to receive focus, which is undesirable. The second EditText in the second line should instead receive focus when pressed, which does not happen. Also, if I eventually manage to focus another EditText on another, and then the first one is shown (for example, by clicking "Next" on the softkeyboard ), the first visible one will get focus after the keyboard is rejected and the ListView is resized to full size again.
I tried several other things, for example, to intercept the onFocusChange() events for a ListView, knowing which EditText was pressed by its TouchListener . Setting the focus for this some EditText again did not lead to any success.
Using a ScrollView instead of a ListView , as suggested by other users, is not an option for the respective project.
android android-softkeyboard android-listview android-edittext ontouchlistener
Display name Dec 05 '13 at 17:18 2013-12-05 17:18
source share