I'm using WindowManager.LayoutParams.FLAG_SECURE to disable screenshot. Now is it possible to change the WindowManager.LayoutParams.FLAG_SECURE instantly without reloading the activity?
for example: I have a photo viewer using View Pager and I only want to disable screenshot to selected image . So can I change the flag secure by onPageChanged of view pager?
any thoughts will be highly appreciated. thanks.
Use this code to clear the flag:
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With