01-03-2013 03:53 AM
Okey I have in my page a picture at the top.
And below I have a horizontalfieldmanager of 20 pictures ( scrollable).
Lets say i scroll the horizontalfieldmanager and focus on 10th picture.I then move my focus to the picture at the top...
then move it back to the horizontalfieldmanager
a problem would arise. the focus will be on the first picture which is out of my screen..
( as i scrolled and focused on 10th pic)
how can I fix this issue?
01-03-2013 02:06 PM
You should control the focus programmatically. The best way would be to remember the last field in focus and set focus to it when the manager regains the focus.
Set a FocusChangeListener on the HorizontalFieldManager. In focusChanged of the listener, check whether there is any saved "last field in focus" on FOCUS_GAINED and jump there if yes, and save the field in focus as "last field in focus" on FOCUS_CHANGED. There is nothing to do on FOCUS_LOST.