final SlidingMenu menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.RIGHT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
//menu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
menu.setShadowWidth(5);
menu.setFadeDegree(0.5f);
menu.attachToActivity(HomePage.this, SlidingMenu.SLIDING_CONTENT);
menu.setBehindWidth(200);
menu.setMenu(R.layout.menu);
menus.setOnClickListener(new OnClickListener()
{
@SuppressLint("NewApi")
@Override
public void onClick(View arg0)
{
menu.showMenu();
//or
//menu.toggle();
}
});
请帮助我。
答案 0 :(得分:0)
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
// TODO Auto-generated method stub
switch (position) {
case 0:
Intent i=new Intent(this,your calss name);
startactivity(i);
break;
case 1:
Intent i=new Intent(this,your calss name);
startactivity(i);
break;
case 2:
Intent i=new Intent(this,your calss name);
startactivity(i);
break;
case 3:
Intent i=new Intent(this,your calss name);
startactivity(i);
break;
default:
break;
}
}