文件名称:slidemenu侧滑demo
文件大小:683KB
文件格式:RAR
更新时间:2018-06-07 09:27:56
slidemenu 侧滑
Fragment leftMenuFragment = new MenuLeftFragment(); setBehindContentView(R.layout.left_menu_frame); getSupportFragmentManager().beginTransaction() .replace(R.id.id_left_menu_frame, leftMenuFragment).commit(); SlidingMenu menu = getSlidingMenu(); menu.setMode(SlidingMenu.LEFT_RIGHT); // 设置触摸屏幕的模式 menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN); menu.setShadowWidthRes(R.dimen.shadow_width); menu.setShadowDrawable(R.drawable.shadow); // 设置滑动菜单视图的宽度 menu.setBehindOffsetRes(R.dimen.slidingmenu_offset); // menu.setBehindWidth() // 设置渐入渐出效果的值 menu.setFadeDegree(0.35f); // menu.setBehindScrollScale(1.0f); menu.setSecondaryShadowDrawable(R.drawable.shadow); // 设置右边(二级)侧滑菜单 menu.setSecondaryMenu(R.layout.right_menu_frame); Fragment rightMenuFragment = new MenuRightFragment(); getSupportFragmentManager().beginTransaction() .replace(R.id.id_right_menu_frame, rightMenuFragment).commit();