Wednesday, May 16, 2012

How to shield Android 4.0 HOME Key

Does anybody know how to shield the HOME key in Android 4.0?



The code below only works in 2.2 and 2.3, so how would I change this so it can work in 4.0?



/* FIXME:  How does it works within Android 4.0? */
@Override
public void onAttachedToWindow() {
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
super.onAttachedToWindow();
}




No comments:

Post a Comment