Search code examples
androidandroid-fragmentsactionbarsherlockslidingmenu

how to add actionbarsherlock menu to a fragment


I am using both actionbarsherlock and slidingmenu objects

the point is, I want my menu - which is sliding to do the following

  1. push the currently visible screen aside, along with its actionbar
  2. the fragment that is displayed inside the menu to have a different actionbar

how do i do that?

I've set everything to make 1 work but the fragment is missing the menu - how to add it ?


Solution

  • You can't have multiple ActionBar in the same activity. Best thing you could probably do, is not make the ActionBar slide with the menu, while starting/finishing an ActionMode when you open up/close the sliding menu. Or if you really want to slide the ActionBar, then simply create a view in the menu fragment that will looks like an action bar.