How To Get Supportactionbar When My Class Extends Expandablelistactivity
I have a class which extends ExpandableListActivity to display my data as explandable list view, now my app supporting older version till API 7 how to add ActionBar using getSuppor
Solution 1:
Looking at the ExpandableListActivity source code, it seems like it would be easy to duplicate the same functionality in your own class and have it extend ActionBarActivity
as its base class.
Solution 2:
I would suggest you to use the ActionBarActivity
. There you have the method getSupportActionBar
.
To show your ExpandableList
you can add a ListFragment
from the support-v4 lib.
There is a method called setListAdapter()
where you can add a ExpandableListAdapter
.
Post a Comment for "How To Get Supportactionbar When My Class Extends Expandablelistactivity"