android 4.0.x Home键事件拦截/监听
在2.3.x 的主要做法如下,具体实现网上有很多文章
@Override
public void onAttachedToWindow() {
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
super.onAttachedToWindow();
}
代码移植到4.0.1后 this.getWindow
原创
2012-07-17 17:21:04 ·
12349 阅读 ·
5 评论