當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。