本文整理了Java中android.app.Dialog.onKeyDown()
方法的一些代码示例,展示了Dialog.onKeyDown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialog.onKeyDown()
方法的具体详情如下:
包路径:android.app.Dialog
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!