Hi all,
How to make such locking variant ?
With possibility to remove this locking-window and start regular app activity.
Unlock password is "7777"
How to make such locking variant ?
With possibility to remove this locking-window and start regular app activity.
B4X:
...
mRl = new RelativeLayout(this);
mRl.setBackgroundColor(0x80000000);
mRl.setOnKeyListener(new OnKeyListener(){
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
Log.d("LockScreen", "keyCode = "+keyCode);
return true;
}
});
...
mParams = new WindowManager.LayoutParams(
WindowManager.LayoutParams.FILL_PARENT,
WindowManager.LayoutParams.FILL_PARENT,
WindowManager.LayoutParams.TYPE_SYSTEM_ERROR,
// Draws over status bar
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_FULLSCREEN,
PixelFormat.TRANSLUCENT);
...
mWindowManager = (WindowManager) mContext
.getSystemService(Context.WINDOW_SERVICE);
...
mWindowManager.addView(mRl, mParams);
...
Attachments
Last edited: