Reputation: 479
I have a WindowManger
in a Service and I add some flags:
params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
PixelFormat.TRANSLUCENT);
params.gravity = Gravity.TOP | Gravity.LEFT;
params.y = 0; //topPadding
params.x = 0;
windowManager.updateViewLayout(view, params);
How can I remove WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
later in another part?
Upvotes: 2
Views: 7194
Reputation: 710
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
Upvotes: 11
Reputation: 93579
Ok, to do it programatically later
layoutParams.flags = layourParams.flags & ~flag_you_don't_want;
This will turn off only the bit you want off. Then request a new layout to have the changes reflected on screen.
This technique is called "ANDing out" the bit.
Upvotes: 9