i am trying to create a lock screen and for that i need to disable the home button..
i found the following code, its recommended by many and I tried it:
@Override
public void onAttachedToWindow()
{
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
super.onAttachedToWindow();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
return false;
}
Now i know what its doing, I tried it on HTC Explorer, Sony Ericsson Experia Neo V, and Samsung Galaxy S2..
The code works in HTC and Sony but it seems to have no effect on Samsung Galaxy s2.. Please note that Samsung is rooted while others not...is rooted device the problem??
Any Suggestions pls?