I have a simple input form; it's a vertical LinearLayout with EditTexts inside a ScrollView.
<ScrollView android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView style="@style/Text"
android:text="Name"/>
<EditText style="@style/EditBox"/>
</LinearLayout>
<View style="@style/Divider"/>
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView style="@style/Text"
android:text="Password"/>
<EditText style="@style/EditBox"/>
</LinearLayout>
...
</LinearLayout>
</ScrollView>
When the user scrolls the form, it automatically moves its focus to the visible EditText. It is possible to disable such behavior and always keep focus on the EditText currently selected by touch?
I understand that this may be a feature, but I need to disable it.
Thanks!
requestChildFocus()
? – GunmakerScrollView
method. I mean, you can try to define your ownScrollView
with overridenrequestChildFocus()
to handle child focus change. It's just a guess though. – Gunmaker