一、按键监听
myMaterDialog.setOnListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount()==0)
{
myMaterDialog.dismiss();
UserBuyActivity.this.finish();
}
return false;
}
});
0 条评论