android.app.Dialog.onKeyDown()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(180)

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

Dialog.onKeyDown介绍

暂无

代码示例

代码示例来源:origin: navasmdc/MaterialDesignLibrary

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  // TODO 自动生成的方法存根
   if (keyCode == KeyEvent.KEYCODE_BACK )  {
     dismiss();
   }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: facebook/facebook-android-sdk

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK) {
    cancel();
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: xxxtai/Android-CourierAssistant

/**屏蔽返回键**/
  @Override
  public boolean onKeyDown(int keyCode,KeyEvent event){
    if(keyCode==KeyEvent.KEYCODE_BACK)
      return true;
    return super.onKeyDown(keyCode, event);
  }
}

代码示例来源:origin: MiEcosystem/mijiaSDK

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (mAlert.onKeyDown(keyCode, event))
    return true;
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: square1-io/rich-text-android

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK) {
    cancel();
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: andforce/iBeebo

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
    animateClose(avatar, ori);
    return true;
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: devinhu/androidone

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK) {
    if (canNotCancel) {
      NToast.shortToast(getContext(), tipMsg);
      return true;
    }
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: sealtalk/sealtalk-android

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK) {
    if (canNotCancel) {
      NToast.shortToast(getContext(), tipMsg);
      return true;
    }
  }
  return super.onKeyDown(keyCode, event);
}

相关文章