currently Hey, currently I am developing an application that contains a form, with some edittext fields, some checkboxes and a switch at the end. The layout looks like this:
<RelativeLayout>
<ScrollView>
<LinearLayout>
<LinearLayout>
<TextView></TextView>
<Checkbox></Checkbox>
</LinearLayout>
<LineraLayout>
<TextView></TextView>
<EditText></EditText>
</LinearLayout>
<LinearLayout>
<TextView></TextView>
<Switch></Switch>
</LinearLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
So now, if I click the switch, the switch looses its focus and the scrollview scrolls to the first form element, the checkbox. I already tried to use the descendantFocusability attribute with "blockDescendants" in the upper LinearLayout of the Switch, but it doesn't work.
Anyone got an idea how to solve this issue?
Aucun commentaire:
Enregistrer un commentaire