lwuitlwuit-list

Scrolling is preserved Lwuit List


I have 3 Categorybars, each bar present a List view. I got an issue from Nokia that "Whenever accessing a new view, even if it was visited earlier, the content must not be already scrolled. The user must view the content from the top of the list."

My situation now is when I scroll list in the 1st category bar to some position(like 6th position), then go to the 2nd category bar, then go back to the 1st category bar again, the list is still at the 6th position.

From my understanding, I have to keep the view of content from the top of the list. How can I do that? Do you have any suggestion?

enter image description here


Solution

  • Try to get the first element of the list focused, using setSelectedItem of the list or something like that, when you load the view.