当左上栏单击它时,我想通过操作栏 sherlok 显示幻灯片菜单,它显示了幻灯片菜单。我做了所有事情,但我不能让事件从左上角显示幻灯片菜单我做了以下但它不起作用
@Override
public boolean onOptionsItemSelected(com.actionbarsherlock.view.MenuItem item) {
// TODO Auto-generated method stub
switch (item.getItemId())
{
case android.R.id.home:
SlidingMenu menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
menu.setFadeDegree(0.35f);
menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
menu.setBehindOffset(100);
menu.setMenu(R.layout.activity_menu);
break;
}
return super.onOptionsItemSelected(item);
}
请帮我