Frage

I am working on BB 10 cascades application and Android application. I have a requirement i.e, I should display a list view which is sorted according to their groups but in UI the group name should display only the 1st list item which is appearing on top of the screen. when I scroll the list view the group name should also change accordingly.

For example I have a list view with group

Cricket {Bat, Ball}, Dress {Shirt, Pant}, Computer{Keyboard, mouse}

Check the following image to understandenter image description here

When I scroll the list the heading should change according to the 1st item appear on the screen enter image description here

Please help...

War es hilfreich?

Lösung

For BlackBerry 10, you will need to use a GroupDataModel, you will be able to set sortingKeys.

I am not familiar with Android development, but I think this is what you are looking for. Since the values are stored in ArrayList, you will be able to do a java.util.Collections.sort before you add to the listview.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top