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


Java MenuDrawer.STATE_OPENING属性代码示例

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


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

示例1: onBackPressed

@Override
public void onBackPressed() {
	final int drawerState = mMenuDrawer.getDrawerState();
       if (drawerState == MenuDrawer.STATE_OPEN || drawerState == MenuDrawer.STATE_OPENING) {
           mMenuDrawer.closeMenu();
           return;
       } else {
       	if (isTaskRoot()) {
       		Intent homeIntent = new Intent(Intent.ACTION_MAIN);
               homeIntent.addCategory(Intent.CATEGORY_HOME);
               homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
               startActivity(homeIntent);
               return;
       	}
       }
	
	super.onBackPressed();
	
}
 
开发者ID:Nightonke,项目名称:TimeFleeting,代码行数:19,代码来源:MainActivity.java

示例2: onBackPressed

@Override
public void onBackPressed()
{
	final int drawerState = menuDrawer.getDrawerState();

	if (drawerState == MenuDrawer.STATE_OPEN || drawerState == MenuDrawer.STATE_OPENING)
	{
		menuDrawer.closeMenu(true);
		return;
	}

	finish();

	super.onBackPressed();
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:15,代码来源:HelpActivity.java

示例3: onBackPressed

@Override
public void onBackPressed()
{
	final int drawerState = menuDrawer.getDrawerState();

	if (drawerState == MenuDrawer.STATE_OPEN || drawerState == MenuDrawer.STATE_OPENING)
	{
		menuDrawer.closeMenu(true);
		return;
	}

	super.onBackPressed();
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:13,代码来源:SubsonicTabActivity.java

示例4: onBackPressed

@Override
public void onBackPressed() {
	final int drawerState = mMenuDrawer.getDrawerState();
	if (drawerState == MenuDrawer.STATE_OPEN
			|| drawerState == MenuDrawer.STATE_OPENING) {
		mMenuDrawer.closeMenu();
		return;
	}
	ActivityCollector.finishAll();
	super.onBackPressed();
}
 
开发者ID:minixalpha,项目名称:Webo,代码行数:11,代码来源:MainPageActivity.java

示例5: onBackPressed

@Override
public void onBackPressed() {
    if (mMenuDrawer != null) {
        final int drawerState = mMenuDrawer.getDrawerState();
        if (drawerState == MenuDrawer.STATE_OPEN ||
                drawerState == MenuDrawer.STATE_OPENING) {
            mMenuDrawer.closeMenu();
            return;
        }
    }
    super.onBackPressed();
}
 
开发者ID:brk3,项目名称:glimmr,代码行数:12,代码来源:MainActivity.java

示例6: dispatchKeyEvent

@Override
public boolean dispatchKeyEvent(KeyEvent event) {
	final int drawerState = mMenuDrawer.getDrawerState();
	if (drawerState == MenuDrawer.STATE_OPEN
			|| drawerState == MenuDrawer.STATE_OPENING) {
		mMenuDrawer.closeMenu();
		return true;
	}
	if (event.getKeyCode() == KeyEvent.KEYCODE_BACK
			&& event.getAction() == KeyEvent.ACTION_DOWN) {
		MainActivityExit();
	}
	return super.dispatchKeyEvent(event);
}
 
开发者ID:Consoar,项目名称:zhangshangwuda,代码行数:14,代码来源:MainActivity.java

示例7: onBackPressed

@Override
public void onBackPressed() {
    final int drawerState = mMenuDrawer.getDrawerState();
    if (drawerState == MenuDrawer.STATE_OPEN || drawerState == MenuDrawer.STATE_OPENING) {
        mMenuDrawer.closeMenu();
        return;
    }

    super.onBackPressed();
}
 
开发者ID:YerayAlonso,项目名称:LligaIntermunicipal,代码行数:10,代码来源:MainActivity.java

示例8: onBackPressed

/**
 * Called when the activity has detected the user's press of the back key.
 * If the activity has a menu drawer attached that is opened or in the
 * process of opening, the back button press closes it. Otherwise, the
 * normal back action is taken.
 */
@Override
public void onBackPressed() {
	if (mMenuDrawer != null) {
		final int drawerState = mMenuDrawer.getDrawerState();
		if (drawerState == MenuDrawer.STATE_OPEN
				|| drawerState == MenuDrawer.STATE_OPENING) {
			mMenuDrawer.closeMenu();
			finish();
			return;
		}
	}

	super.onBackPressed();
}
 
开发者ID:ais-albania,项目名称:ZalartAndroid,代码行数:20,代码来源:BaseActivity.java

示例9: onBackPressed

@Override public void onBackPressed() {
  final int drawerState = drawer.getDrawerState();
  if (drawerState == MenuDrawer.STATE_OPEN || drawerState == MenuDrawer.STATE_OPENING) {
    drawer.closeMenu();
    return;
  }

  if (stack.pop(true)) return;

  super.onBackPressed();
}
 
开发者ID:SimonVT,项目名称:fragmentstack,代码行数:11,代码来源:StackSample.java

示例10: onOptionsItemSelected

@Override public boolean onOptionsItemSelected(MenuItem item) {
  switch (item.getItemId()) {
    case android.R.id.home:
      final int drawerState = drawer.getDrawerState();
      if (drawerState == MenuDrawer.STATE_OPEN || drawerState == MenuDrawer.STATE_OPENING) {
        drawer.closeMenu();
      } else if (!stack.pop(drawerState == MenuDrawer.STATE_CLOSED)) {
        drawer.toggleMenu();
      }
      return true;
  }

  return super.onOptionsItemSelected(item);
}
 
开发者ID:SimonVT,项目名称:fragmentstack,代码行数:14,代码来源:StackSample.java


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