@Override public void onAttachedToWindow() { this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD); super.onAttachedToWindow(); } |
此方法加的activity里面然后就可以在onKeyDown这个方法里捕获home事件了
lovely_1133 ©著作权
文章标签 笔记 lovely_1133 开发笔记 home键 Android,Android开发 文章分类 Android 移动开发
@Override public void onAttachedToWindow() { this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD); super.onAttachedToWindow(); } |
此方法加的activity里面然后就可以在onKeyDown这个方法里捕获home事件了
Android的HOME键屏蔽需要在activit
最近研究锁屏,按照常规的方法,常规方法如下Java代码
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M