I have the following problem: Within ScrollView , I have a TableLayout with lots of EditTexts , Spinners , RadioGroups and so on. When the action begins, the first EditText gets focus. If I scroll down to Spinner and select an item, it automatically scrolls back to the EditText in which the focus was.
I have already tried to use the following:
((Spinner) findViewById(R.id.attributes_status)).setFocusable(true); ((Spinner) findViewById(R.id.attributes_status)).setFocusableInTouchMode(true);
R.id.attributes_status is a spinner. This solves the problem of automatic scrolling, but now I have to double-click the counter (1. set focus, 2. show a list of items)!
Does anyone know how to properly set focus on Spinner ? Or how to suppress the problem of automatic scrolling without changing the behavior of Spinner ?
Thanks in advance and best regards,
Sebastian
source share