Wednesday, 15 April 2015

android - Use custom number of items in ListView using ArrayAdapter -



android - Use custom number of items in ListView using ArrayAdapter -

i displaying list video episodes in listview. this, created subclass of arrayadapter , passed list of episodes. works fine.

now, want add together three additional items list, because list should start item describing show episodes belong. add together 2 additional headers (one description of show , 1 before episodes start).

so listview should display episodelist.size()+3 items. question if have fake these 3 items in episodelist , insert 3 dummy items @ origin of list tell arrayadapter should display desired number of items, or there less hackish way of doing it?

you can acheive through listview sections. here tutorial

https://code.google.com/p/android-amazing-listview/

android android-listview android-arrayadapter

No comments:

Post a Comment