- Do I have to use fragments?
Yes, the library is built for it. In addtion, no two Activity can be in the foreground at the same time.
2 . Why I can't open the menu when I click on home button?
This is because that button isn't intend to open the sliding menu.
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
will enable the app icon as a back button. This goes back from the stack. See also Navigation . Your slindermenu is a fragment thats is put on the side of your Activity, hence they exsit at the same moment, hence not in its not related to any navigation.
To open the menu, you need to call :
SlidingMenu sm = getSlidingMenu();
sm.toggle();//or .open();
if you want to override onOptionsItemSelected
, you need:
extends SlidingFragmentActivity
Modify the sliding menu library. Have ALL the Fragments extend from the sherlock library related fragments. (btw this is written in the docs under Setup with ActionBarSherlock.).