androidx.appcompat.app.AppCompatActivity.onBackPressed()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中androidx.appcompat.app.AppCompatActivity.onBackPressed()方法的一些代码示例,展示了AppCompatActivity.onBackPressed()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppCompatActivity.onBackPressed()方法的具体详情如下:
包路径:androidx.appcompat.app.AppCompatActivity
类名称:AppCompatActivity
方法名:onBackPressed

AppCompatActivity.onBackPressed介绍

暂无

代码示例

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
public void onBackPressed() {
  super.onBackPressed();
}

代码示例来源:origin: PhilJay/MPAndroidChart

@Override
public void onBackPressed() {
  super.onBackPressed();
  overridePendingTransition(R.anim.move_left_in_activity, R.anim.move_right_out_activity);
}

代码示例来源:origin: ArthurHub/Android-Image-Cropper

@Override
public void onBackPressed() {
 super.onBackPressed();
 setResultCancel();
}

代码示例来源:origin: bluelinelabs/Conductor

@Override
public void onBackPressed() {
  if (!router.handleBack()) {
    super.onBackPressed();
  }
}

代码示例来源:origin: cSploit/android

@Override
public void onBackPressed(){
 super.onBackPressed();
 overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left);
}

代码示例来源:origin: AppIntro/AppIntro

@Override
public void onBackPressed() {
  // Do nothing if go back lock is enabled or slide has custom policy.
  if (!isGoBackLockEnabled) {
    if (!pager.isFirstSlide(fragments.size())) {
      pager.goToPreviousSlide();
    } else {
      super.onBackPressed();
    }
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
public void onBackPressed() {
  //handle the back press :D close the drawer first and if the drawer is closed close the activity
  if (result != null && result.isDrawerOpen()) {
    result.closeDrawer();
  } else {
    super.onBackPressed();
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
  public void onBackPressed() {
    //handle the back press :D close the drawer first and if the drawer is closed close the activity
    if (result != null && result.isDrawerOpen()) {
      result.closeDrawer();
    } else {
      super.onBackPressed();
    }
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
  public void onBackPressed() {
    //handle the back press :D close the drawer first and if the drawer is closed close the activity
    if (result != null && result.isDrawerOpen()) {
      result.closeDrawer();
    } else {
      super.onBackPressed();
    }
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
  public void onBackPressed() {
    //handle the back press :D close the drawer first and if the drawer is closed close the activity
    if (result != null && result.isDrawerOpen()) {
      result.closeDrawer();
    } else {
      super.onBackPressed();
    }
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
public void onBackPressed() {
  //handle the back press :D close the drawer first and if the drawer is closed close the activity
  if (result != null && result.isDrawerOpen()) {
    result.closeDrawer();
  } else {
    super.onBackPressed();
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
public void onBackPressed() {
  //handle the back press :D close the drawer first and if the drawer is closed close the activity
  if (result != null && result.isDrawerOpen()) {
    result.closeDrawer();
  } else {
    super.onBackPressed();
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
  public void onBackPressed() {
    //handle the back press :D close the drawer first and if the drawer is closed close the activity
    if (result != null && result.isDrawerOpen()) {
      result.closeDrawer();
    } else {
      super.onBackPressed();
    }
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
public void onBackPressed() {
  //handle the back press :D close the drawer first and if the drawer is closed close the activity
  if (result != null && result.isDrawerOpen()) {
    result.closeDrawer();
  } else {
    super.onBackPressed();
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
public void onBackPressed() {
  //handle the back press :D close the drawer first and if the drawer is closed close the activity
  if (result != null && result.isDrawerOpen()) {
    result.closeDrawer();
  } else {
    super.onBackPressed();
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
public void onBackPressed() {
  //handle the back press :D close the drawer first and if the drawer is closed close the activity
  if (result != null && result.isDrawerOpen()) {
    result.closeDrawer();
  } else {
    super.onBackPressed();
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
public void onBackPressed() {
  //handle the back press :D close the drawer first and if the drawer is closed close the activity
  if (crossFader != null && crossFader.isCrossFaded()) {
    crossFader.crossFade();
  } else {
    super.onBackPressed();
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
  public void onBackPressed() {
    //handle the back press :D close the drawer first and if the drawer is closed close the activity
    if (result != null && result.isDrawerOpen()) {
      result.closeDrawer();
    } else {
      super.onBackPressed();
    }
  }
}

代码示例来源:origin: mikepenz/MaterialDrawer

@Override
  public void onBackPressed() {
    //handle the back press :D close the drawer first and if the drawer is closed close the activity
    if (result != null && result.isDrawerOpen()) {
      result.closeDrawer();
    } else {
      super.onBackPressed();
    }
  }
}

代码示例来源:origin: cSploit/android

@Override
 public void onBackPressed(){
  setStoppedState();
  super.onBackPressed();
  overridePendingTransition(R.anim.fadeout, R.anim.fadein);
 }
}

相关文章

微信公众号

最新文章

更多

AppCompatActivity类方法