I have a pretty big ScrollView
that consists of EditTexts
and Spinners
.
I have a huge problem with EditText
focus that has been driving me nuts for the last 2 days. The issue is:
After editing an EditText
, press 'back' to close the keyboard (the EditText) still remains focused, so when I scroll down to a Spinner and pick an item, the ScrollView jumps back to the last focused EditText, which is very annoying.
I've looked all over StackOverflow and tried everything. I've tried clearFocus()
on the EditText after editing, but the focus just jumps to another EditText. I put android:focusableInTouchMode="true"
and android:focusable="true"
on the parent LinearLayout
, hoping that it would steal the focus. Still doesn't work.
I have tried setting click listeners on spinners, and calling requestFocus()
when clicking them. Nothing works.
Please help.