android - Listview design with in two section -
is there default way design listview 2 section different viewitems? both section must increase height according content , each section should able hide idependantly .the example of listview talking given in below image
first thought take 2 listview saperated textview in 1 parent scrollview realised 2 listview have 2 independent scrollview. need 1 scrollview both section. how achieve such gui given below? don't need code. want hint. thanks.
override getitemviewtypecount()
in adapter return 2 in case if want 2 different types of views.
override getitemviewtype(int pos)
tell adapter's getview(...)
how treat different views.
create 2 different view holders.
finally in getview(...)
after querying view type (by mentioning in model) inflate corresponding view , instantiate corresponding view holder , voila you're done.
also refer examples of view holder pattern in list views if not clear.
Comments
Post a Comment