Pregunta

I am designing an Android application that will primarily be controlled via the keyboard.

In this applications there are two list views next to each other. However when the focus changes between the list views, the selection in the new list view changes to the item closest to the selection in the old list view - I do not want the selected item to change until the user subsequently presses UP or DOWN on the keyboard.

Example:

List View Problem

List A is not focused, and Item 3 is selected. List B currently has focus, and in this list view Item B is currently selected.

Currently if the user presses 'left' on the keyboard, List A will gain focus, and Item 2 will be selected - as it is closest to the currently selected item in List B. What I want is for List A to retain it's currently selected item when obtaining focus, regardless of the position selected in List B.

¿Fue útil?

Solución

so you can memorize necessary positions in both lists and change background for this concrete items. and redefine public boolean onKeyDown(int keyCode, KeyEvent event)
so if you need i should write code

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top