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


Java SlidingMenu.setBehindOffset方法代码示例

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


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

示例1: configSlidingMenu

import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
private void configSlidingMenu(boolean phone) {
    SlidingMenu slidingMenu = getSlidingMenu();
    slidingMenu.setShadowWidthRes(R.dimen.shadow_width);
    slidingMenu.setShadowDrawable(R.drawable.shadow);
    if (phone)
        slidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
    else
        slidingMenu.setBehindOffset(Utility.getScreenWidth());

    slidingMenu.setFadeDegree(0.35f);
    slidingMenu.setOnPageScrollListener(new SlidingMenu.OnPageScrollListener() {
        @Override
        public void onPageScroll() {
            LongClickableLinkMovementMethod.getInstance().setLongClickable(false);
            (getFriendsTimeLineFragment()).clearActionMode();
        }
    });

    slidingMenu.setOnClosedListener(new SlidingMenu.OnClosedListener() {
        @Override
        public void onClosed() {
            LongClickableLinkMovementMethod.getInstance().setLongClickable(true);
            LocalBroadcastManager.getInstance(MainTimeLineActivity.this).sendBroadcast(new Intent(AppEventAction.SLIDING_MENU_CLOSED_BROADCAST));
        }
    });
}
 
开发者ID:dingyu,项目名称:Dingyu,代码行数:27,代码来源:MainTimeLineActivity.java

示例2: configSlidingMenu

import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
private void configSlidingMenu(boolean phone) {
    SlidingMenu slidingMenu = getSlidingMenu();
    slidingMenu.setShadowWidthRes(R.dimen.shadow_width);
    slidingMenu.setShadowDrawable(R.drawable.shadow_slidingmenu);
    if (phone) {
        slidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
    } else {
        slidingMenu.setBehindOffset(Utility.getScreenWidth());
    }

    slidingMenu.setFadeDegree(0.35f);
    slidingMenu.setOnPageScrollListener(new SlidingMenu.OnPageScrollListener() {
        @Override
        public void onPageScroll() {
            LongClickableLinkMovementMethod.getInstance().setLongClickable(false);
            (getFriendsTimeLineFragment()).clearActionMode();
            (getFavFragment()).clearActionMode();
            (getCommentsTimeLineFragment()).clearActionMode();
            (getMentionsTimeLineFragment()).clearActionMode();
            (getMyProfileFragment()).clearActionMode();

            if (GlobalContext.getInstance().getAccountBean().isBlack_magic()) {
                (getSearchFragment()).clearActionMode();
                (getDMFragment()).clearActionMode();
            }
        }
    });

    slidingMenu.setOnClosedListener(new SlidingMenu.OnClosedListener() {
        @Override
        public void onClosed() {
            LongClickableLinkMovementMethod.getInstance().setLongClickable(true);
            LocalBroadcastManager.getInstance(MainTimeLineActivity.this)
                    .sendBroadcast(new Intent(AppEventAction.SLIDING_MENU_CLOSED_BROADCAST));
        }
    });
}
 
开发者ID:shawnlinboy,项目名称:siciyuan,代码行数:38,代码来源:MainTimeLineActivity.java

示例3: configSlidingMenu

import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
private void configSlidingMenu() {
	SlidingMenu sm = getSlidingMenu();
	sm.setShadowWidth(20);
	sm.setShadowDrawable(R.drawable.shadow);
	sm.setBehindOffset(80);
	sm.setFadeDegree(0.35f);

	// 设置slding menu的几种手势模式
	// TOUCHMODE_FULLSCREEN 全屏模式,在content页面中,滑动,可以打开sliding menu
	// TOUCHMODE_MARGIN 边缘模式,在content页面中,如果想打开slding ,你需要在屏幕边缘滑动才可以打开slding
	// menu
	// TOUCHMODE_NONE 自然是不能通过手势打开啦
	sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
}
 
开发者ID:yongbo000,项目名称:wakao-app,代码行数:15,代码来源:MainActivity2.java

示例4: onCreate

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

	// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
	// WindowManager.LayoutParams.FLAG_FULLSCREEN);

	SysApplication.getInstance().addActivity(this); // �����ٶ��������this
	setContentView(R.layout.paychart);
	// set the Behind View
	setBehindContentView(R.layout.frame_menu);

	SystemBarTintManager mTintManager;
	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
		setTranslucentStatus(true);
	}
	mTintManager = new SystemBarTintManager(this);
	mTintManager.setStatusBarTintEnabled(true);
	mTintManager.setStatusBarTintResource(R.color.fragment2);

	payDAO = new PayDAO(PayChart.this);
	KindDatap = new ArrayList<KindData>();
	ptypeDAO = new PtypeDAO(PayChart.this);
	incomeDAO = new IncomeDAO(PayChart.this);
	itypeDAO = new ItypeDAO(PayChart.this);

	FragmentTransaction fragmentTransaction = getFragmentManager()
			.beginTransaction();
	MenuFragment menuFragment = new MenuFragment();
	fragmentTransaction.replace(R.id.menu, menuFragment);
	fragmentTransaction.commit();

	// customize the SlidingMenu
	SlidingMenu sm = getSlidingMenu();
	sm.setMode(SlidingMenu.LEFT);
	sm.setShadowWidth(50);
	sm.setShadowDrawable(R.drawable.shadow);
	sm.setBehindOffset(260);
	sm.setFadeDegree(0.4f);
	// ����slding menu�ļ�������ģʽ
	// TOUCHMODE_FULLSCREEN ȫ��ģʽ����contentҳ���У����������Դ�sliding menu
	// TOUCHMODE_MARGIN ��Եģʽ����contentҳ���У�������slding ,����Ҫ����Ļ��Ե�����ſ��Դ�slding
	// menu
	// TOUCHMODE_NONE ��Ȼ�Dz���ͨ�����ƴ���
	sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);

	// ʹ�����Ϸ�icon�ɵ㣬������onOptionsItemSelected����ſ��Լ�����R.id.home
	// getActionBar().setDisplayHomeAsUpEnabled(true);

	initView();

}
 
开发者ID:linmp4,项目名称:quickmark,代码行数:54,代码来源:PayChart.java


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