当前位置: 首页>>代码示例>>Java>>正文


Java SlidingMenu.setBehindCanvasTransformer方法代码示例

本文整理汇总了Java中com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.setBehindCanvasTransformer方法的典型用法代码示例。如果您正苦于以下问题:Java SlidingMenu.setBehindCanvasTransformer方法的具体用法?Java SlidingMenu.setBehindCanvasTransformer怎么用?Java SlidingMenu.setBehindCanvasTransformer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jeremyfeinstein.slidingmenu.lib.SlidingMenu的用法示例。


在下文中一共展示了SlidingMenu.setBehindCanvasTransformer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	// set the Above View
	setContentView(R.layout.content_frame);
	getSupportFragmentManager()
	.beginTransaction()
	.replace(R.id.content_frame, new SampleListFragment())
	.commit();
	
	SlidingMenu sm = getSlidingMenu();
	setSlidingActionBarEnabled(true);
	sm.setBehindScrollScale(0.0f);
	sm.setBehindCanvasTransformer(mTransformer);
}
 
开发者ID:JoeSteven,项目名称:Moring-Alarm,代码行数:16,代码来源:CustomAnimation.java

示例2: onCreate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EventBus.getDefault().register(this);
        if (new SpTool(this, SpTool.SP_SETTING).getBoolean("moon", false)) {
            BaseApplication.sDefaultImageDrawable = R.drawable.z_iv_default_y;
            setTheme(R.style.ActivityThemeMoon);
        } else {
            BaseApplication.sDefaultImageDrawable = R.drawable.z_iv_default;
            setTheme(R.style.ActivityTheme);
        }
        // set the Above View
        if (savedInstanceState != null) {
            mFragmentMainHome = (FragmentMainHome) getSupportFragmentManager().getFragment(savedInstanceState, "mFragmentMainHome");
        }
        if (mFragmentMainHome == null) {
            mFragmentMainHome = new FragmentMainHome();
            mFragmentMainHome.setArguments(getIntent().getExtras());
        }
        setContentView(R.layout.activity_main_sliding);
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.content_frame, mFragmentMainHome)
                .commit();

        // set the Behind View
        setBehindContentView(R.layout.v_layout_sliding_menu);
        if (savedInstanceState != null) {
            mFragmentSlidingMenu = (FragmentSlidingMenu) this.getSupportFragmentManager().findFragmentById(R.id.menu_frame);
        }
        if (mFragmentSlidingMenu == null) {
            mFragmentSlidingMenu = new FragmentSlidingMenu();
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.menu_frame, mFragmentSlidingMenu)
                    .commit();
        }

        // customize the SlidingMenu
        SlidingMenu sm = getSlidingMenu();
        sm.setShadowWidthRes(R.dimen.slidingmenu_shadow_width);
        sm.setShadowDrawable(R.drawable.v_sliding_menu_shadow);
        sm.setBehindOffset(ScreenTools.getScreenParams(this).width * 3 / 10);
        sm.setFadeDegree(0.35f);
        //设置触摸方式,必须为 TOUCHMODE_FULLSCREEN(全屏可触摸),TOUCHMODE_MARGIN(边缘可触摸),默认 48dp, TOUCHMODE_NONE(不可触摸)三者之一
        sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
        //动画效果
        sm.setBehindScrollScale(0.0f);
        sm.setBackgroundColor(Color.parseColor("#252525"));
        sm.setBehindCanvasTransformer(getTransformer(1));

//		getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }
 
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:52,代码来源:ActivityMainSliding.java


注:本文中的com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.setBehindCanvasTransformer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。