I am trying to use the ExpandableListActivity in my program but I have already inherited the TabActivity in my class. I cannot do multiple inheritance and I need to use both the ExpandableListView and the Tabs in my program.
I checked Google’s code for the ExpandableListView here http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html.
But here they are inheriting the ExpandableListActivity which I cannot do as I have already inherited TabActivity in my class.
I am aware that I can use ListView without inheriting ListActivity in my class. Can I do the same for the ExpandableListView class also ? If so, then can anyone please provide me with any sample code to use ExtendableListView without inheriting the activity ?
You can have a custom view that extends ExpandableListView and use it inside the TabActivity.
Expandable List View
Main Activity that hosts the tabs
XML Layout file for the tab with the exp list (Tab 1)
In the class for the tab with the exp list
You can also extend the listeners and customize it.
Hope it helps!