The last few days I\'ve been searching for examples on how to make a sliding menu. I\'ve found many ways and decided that jfeinstein10\'s solution should work best. But the
You have to extend SherlockActivity
, and create a menu.xml
wich is your menu layout.
Then just add those few lines in your onCreate
method.
menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
menu.setShadowWidthRes(R.dimen.shadow_width);
menu.setShadowDrawable(R.drawable.shadow);
menu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
menu.setFadeDegree(0.35f);
menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
menu.setMenu(R.layout.menu);
That what i'm using right now and works perfectly.
If you don't want ActionBar, just hide it like this :
ActionBar myBar = getActionBar();
myBar.hide();