Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否无法监听手机返回键 #31

Open
RocLeee opened this issue Jul 16, 2018 · 2 comments
Open

是否无法监听手机返回键 #31

RocLeee opened this issue Jul 16, 2018 · 2 comments

Comments

@RocLeee
Copy link

RocLeee commented Jul 16, 2018

使用了.enableOutsideTouchableDissmiss(false),点击手机返回键,popUpWindow消失,想做强制升级,想监控手机返回。是否能设置或者监听。谢谢

@LLQQHH
Copy link

LLQQHH commented Dec 5, 2018

pop.getContentView().setOnKeyListener(new OnKeyListener() {
@OverRide
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
pop.dismiss();
return true;
}
return false;
}
});
网上这种做法,好像并不行,我的手机是红米,Android6.0以上的!

@everyline
Copy link

上面的代码好像不起作用,控制不了返回键

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants