Android tutorial (2018) - 60 - Building an Alert Dialog
0
0
5 Views·
14 Aug 2019
In
Development / Mobile Apps
The recommended way of creating dialog in your android app is by using a DialogFragment.
If you use the DialogFragment for creating the dialog then it will effectively handle Dialog's life-cycle events such as user press the back button, device screen orientation changes etc.
Create a class that extend DialogFragment and override the onCreateDialog method in it. You can create your dialog from this method by using an AlertDialog builder object .
Finally you can display the dialog by calling the show method on an instance of your DialogFragment Sub class.
Like my Facebook page : https://www.facebook.com/codeglympse
Subscribe My YouTube channel : http://www.youtube.com/ticoontechnologies
Show more
100% online learning from the world's best universities, organisations and Instructors
0 Comments
sort Sort By