1.下载SlidingMenu 导入eclipse
2.新建自己android 项目 demo
3.properties ->resource ->android->library->add-apply
4.
menuView = LayoutInflater.from(context).inflate(R.layout.left, null);
slidingMenu = new SlidingMenu(context, MySharedPreferences.bgID);
slidingMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
slidingMenu.setShadowWidthRes(R.dimen.shadow_width);
slidingMenu.setShadowDrawable(R.drawable.shadow);
slidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
slidingMenu.setBehindWidth(dip2px(context, 80));
slidingMenu.attachToActivity((Activity) context,SlidingMenu.SLIDING_WINDOW, MySharedPreferences.bgID);
slidingMenu.setMenu(menuView);