Android tutorial (2018) - 60 - Building an Alert Dialog
73 بار بازدید -
6 سال پیش
-
The recommended way of creating
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 m
6 سال پیش
در تاریخ 1397/03/03 منتشر شده
است.
73
بـار بازدید شده