To create a dialog box, let's create a new fragment. Fragment extends by DialogFragment. Then we use the Builder, in which set title, set message and set positive and negative buttons.
Then we show a dialog fragment from Activity.
#androidstudio #kotlin