How To Use Nested Listview In Android
I need to show data which contains a main object and has many child objects. Each child object has its view which contains checkbox and buttons having functionality. Giving demo de
Solution 1:
You can use Cards Lib
Examples:
And you can customize the card's internal layout to use according to what you need.
Solution 2:
You need an ExpandableListView backed by an ExpandableListAdapter. Here is a sample ExpandableListAdapter from an app that I worked on for practice sometime back (simply use it as an example as it was not designed with efficiency in mind) - Sample ExpandableListAdapter. You can go through the layouts to see how I used them.
You will go about the same as you would by binding a normal ListView to an instance class that extends BaseAdapter but instead you will bind your ExpandableListView to an instance of a class that extends BaseExpandableListAdapter.
Post a Comment for "How To Use Nested Listview In Android"