Is there a guide for migrative Native ActionBar (API 11) to ActionBarSherlock?
My app already has actionbar implemented but now I wish to migrate to ActionBAr Sherlock
Is there a guide for migrative Native ActionBar (API 11) to ActionBarSherlock? My app
Share
Step #1: Add the ActionBarSherlock JAR to the
libs/directory of your project.Step #2: Have your activities (or the whole application) use a Sherlock-flavored theme (e.g.,
Theme.Sherlock,Theme.Sherlock.Light)Step #3: Change all your activities to inherit from their Sherlock-flavored equivalents (e.g.,
Activity->SherlockActivity,ListActivity->SherlockListActivity)Step #4: Change all your fragments to inherit from their Sherlock-flavored equivalents (e.g.,
Fragment->SherlockFragment,ListFragment->SherlockListFragment)Step #5: Change all calls to
getActionBar()togetSupportActionBar()Step #6: Fix up any other imports as needed (e.g.,
onCreateOptionsMenu()will now need the Sherlock’s implementation ofMenuinstead of Android’s)And that should just about do it. You will already have
android:targetSdkVersionset to 11 or higher, courtesy of your existing native action bar implementation, so that step is taken care of for you.