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


Java SlidingMenu.setBehindScrollScale方法代码示例

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


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

示例1: onCreate

import com.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:BusinessWechat,项目名称:YikuairAndroid,代码行数:14,代码来源:CustomAnimation.java

示例2: onCreate

import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle arg0) {
	super.onCreate(arg0);

	mMenu = new SlidingMenu(this);
	mMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
	mMenu.setBehindScrollScale(1f);
	mMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
	mMenu.setFadeEnabled(true);
	mMenu.setFadeDegree(0.35f);
	mMenu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
	mMenu.setMenu(R.layout.sliding_menu_frame);
	mMenu.setOnOpenedListener(new SlidingMenu.OnOpenedListener() {
		
		@Override
		public void onOpened() {
			TopFragment fragment = (TopFragment) getSupportFragmentManager().findFragmentById(R.id.top_content);
			if(fragment != null) {
				fragment.onMenuOpen();
			}
		}
	});

	MenuFragment menuFragment = new MenuFragment();
	menuFragment.setListener(mMenuListener);
	getSupportFragmentManager().beginTransaction().replace(R.id.sliding_menu, menuFragment)
			.commit();

	mMenu.setContent(R.layout.actvy_top);
	
	if(getIntent() != null) {
		int page = getIntent().getIntExtra(Const.Intent.SwitchPage, TopFragmentType.NearAppoint.getValue());
		change(TopFragmentType.find(page), getIntent().getExtras());
	} else {
		change(TopFragmentType.NearAppoint, null);
	}

	upgrade();
}
 
开发者ID:tassadar2002,项目名称:ouser,代码行数:40,代码来源:TopActivity.java

示例3: onCreate

import com.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:androidroadies,项目名称:SlidingMenu-master,代码行数:16,代码来源:CustomAnimation.java

示例4: onCreate

import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	Log.e("test", "responsiveUIActivity on create...........");
	instance = this;
	setContentView(R.layout.responsive_content_frame);
	if (getSupportActionBar() != null)
		getSupportActionBar().hide();

	ClientSocket client = new ClientSocket(this);
	if (client.socket != null)
		Log.e("test", "client.socket != null...................");
	else
		Log.e("test", "client.socket == null...................");

	// check if the content frame contains the menu frame
	if (findViewById(R.id.menu_frame) == null) {
		setBehindContentView(R.layout.menu_frame);
		getSlidingMenu().setSlidingEnabled(true);
		getSlidingMenu()
				.setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE/* TOUCHMODE_FULLSCREEN */);
		// show home as up so we can toggle
		if (getSupportActionBar() != null)
			getSupportActionBar().setDisplayHomeAsUpEnabled(true);
	} else {
		// add a dummy view
		View v = new View(this);
		setBehindContentView(v);
		getSlidingMenu().setSlidingEnabled(false);
		getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
	}
	// set the Above View Fragment
	if (savedInstanceState != null)
		mContent = getSupportFragmentManager().getFragment(
				savedInstanceState, "mContent");
	if (mContent == null)
		mContent = new MessageFragment()/* BirdGridFragment(0) */;
	getSupportFragmentManager().beginTransaction()
			.replace(R.id.content_frame, mContent).commit();

	// set the Behind View Fragment
	getSupportFragmentManager().beginTransaction()
			.replace(R.id.menu_frame, new MenuFragment()).commit();

	// customize the SlidingMenu
	SlidingMenu sm = getSlidingMenu();
	sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
	sm.setShadowWidthRes(R.dimen.shadow_width);
	sm.setShadowDrawable(R.drawable.shadow);
	sm.setBehindScrollScale(0.25f);
	sm.setFadeDegree(0.25f);

	shared = new SharedPreferencesUtil(this);
	Log.e("test", "userinfo.dbid ::" + UserInfo.db_id);
	MessageInfo.groupMap = shared.readGroupMapFromShared(UserInfo.db_id
			+ "_" + YIKUAIR_GROUP);
}
 
开发者ID:BusinessWechat,项目名称:YikuairAndroid,代码行数:58,代码来源:ResponsiveUIActivity.java

示例5: onCreate

import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setTitle(R.string.responsive_ui);

	setContentView(R.layout.responsive_content_frame);

	// check if the content frame contains the menu frame
	if (findViewById(R.id.menu_frame) == null) {
		setBehindContentView(R.layout.menu_frame);
		getSlidingMenu().setSlidingEnabled(true);
		getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
		// show home as up so we can toggle
		getSupportActionBar().setDisplayHomeAsUpEnabled(true);
	} else {
		// add a dummy view
		View v = new View(this);
		setBehindContentView(v);
		getSlidingMenu().setSlidingEnabled(false);
		getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
	}

	// set the Above View Fragment
	if (savedInstanceState != null)
		mContent = getSupportFragmentManager().getFragment(savedInstanceState, "mContent");
	if (mContent == null)
		mContent = new BirdGridFragment(0);	
	getSupportFragmentManager()
	.beginTransaction()
	.replace(R.id.content_frame, mContent)
	.commit();

	// set the Behind View Fragment
	getSupportFragmentManager()
	.beginTransaction()
	.replace(R.id.menu_frame, new BirdMenuFragment())
	.commit();

	// customize the SlidingMenu
	SlidingMenu sm = getSlidingMenu();
	sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
	sm.setShadowWidthRes(R.dimen.shadow_width);
	sm.setShadowDrawable(R.drawable.shadow);
	sm.setBehindScrollScale(0.25f);
	sm.setFadeDegree(0.25f);

	// show the explanation dialog
	if (savedInstanceState == null)
		new AlertDialog.Builder(this)
		.setTitle(R.string.what_is_this)
		.setMessage(R.string.responsive_explanation)
		.show();
}
 
开发者ID:androidroadies,项目名称:SlidingMenu-master,代码行数:54,代码来源:ResponsiveUIActivity.java

示例6: onCreate

import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setTitle(R.string.app_name);

    setContentView(R.layout.content_frame);

    // check if the content frame contains the menu frame
    if (findViewById(R.id.menu_frame) == null) {
        setBehindContentView(R.layout.menu_frame);
        getSlidingMenu().setSlidingEnabled(true);
        getSlidingMenu()
                .setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
        // show home as up so we can toggle
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    } else {
        // add a dummy view
        View v = new View(this);
        setBehindContentView(v);
        getSlidingMenu().setSlidingEnabled(false);
        getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
    }

    // set the Above View Fragment
    if (savedInstanceState != null) {
        mContent = getSupportFragmentManager().getFragment(
                savedInstanceState, "mContent");
        if (mContent == null)
            mContent = new ArticleListFragment();
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.content_frame, mContent).commit();
        // here we should concern about SlidingMenu's request and response
    }

    // set the Behind View Fragment
    getSupportFragmentManager().beginTransaction()
            .replace(R.id.menu_frame, new SlidingMenuFragment()).commit();

    // customize the SlidingMenu
    SlidingMenu sm = getSlidingMenu();
    sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
    sm.setShadowWidthRes(R.dimen.shadow_width);
    sm.setShadowDrawable(R.drawable.shadow);
    sm.setBehindScrollScale(0.25f);
    sm.setFadeDegree(0.25f);
    BusProvider.getInstance().register(this);
}
 
开发者ID:IceskYsl,项目名称:tagskill_android_app,代码行数:48,代码来源:ArticleListActivity.java


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