ActionBarSherlock with settings menu error

This is a known bug in ActionBarSherlock when you use a Tabbed ActionBar + FragmentPagerAdapter, and each fragment has its own options menu. After a configuration change, the entire ActionBar becomes immune. I am using ABS 4.0.2 and Android 2.3.3. The error is still present. Does anyone know how to get around it?

+3
source share
1 answer

Android's default ActionBar works best.

You can have tabs + different snippets for tabs + menus of different options for each tab with a simple modification

onPrepareOptionsMenu(Menu menu)

and use

invalidateOptionsMenu()

However, to compensate for orientation changes, you need to save and load the state of the tabs. For this you will need to change

onSaveInstanceState(Bundle outState)
onCreate(Bundle savedInstanceState)

onResume()
-1

All Articles