设置dialog.cancleable(false),无用,需自行监听回退按键的触发,并进行拦截
dialog.setOnKeyListener((anInterface, keyCode, event) -> {
if (keyCode ==KeyEvent.KEYCODE_BACK &&event.getAction()==KeyEvent.ACTION_DOWN) {
//do something
return true;
}
return false;
});
设置dialog.cancleable(false),无用,需自行监听回退按键的触发,并进行拦截
dialog.setOnKeyListener((anInterface, keyCode, event) -> {
if (keyCode ==KeyEvent.KEYCODE_BACK &&event.getAction()==KeyEvent.ACTION_DOWN) {
//do something
return true;
}
return false;
});