
Author
Robert
Articles 98

Search
Ads
Recent Articles
Categories

Today I'm showing you how to prevent Material Design dialog box of closing when user touch outside of dialog in Android studio.
Solution 1:
dialog.cancelOnTouchOutside(false);
It is used to prevent dialog box by clicking outside the dialog box.
Solution 2:
dialog.cancelable(false);
It is used to prevent dialog box close by pressing back button.
Simple right?
- Last updated 1 month ago
Be the first to leave a comment.
You must login to leave a comment