Skip to content

Instantly share code, notes, and snippets.

@javymarmol
Last active May 25, 2018 21:00
Show Gist options
  • Save javymarmol/971811794cabcd1ced172e56ff8b7a19 to your computer and use it in GitHub Desktop.
Save javymarmol/971811794cabcd1ced172e56ff8b7a19 to your computer and use it in GitHub Desktop.
Enable Disable interaction for user android
//to block user touch events
getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
//To get user interaction back
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment