package Ġca at soft . studio . com . game catalog Ċ Ċ import Ġandroid . app . Activity Ċ import Ġandroid . app . AlertDialog Ċ import Ġandroid . content . Context Ċ import Ġandroidx . fragment . app . Fragment Ċ Ċ fun ĠActivity . start Loading (): AlertDialog Ġ{ ĊĠĠĠ Ġval Ġalert Dialog : ĠAlertDialog ĊĠĠĠ Ġval Ġbuilder Ġ= ĠAlertDialog . Builder ( this ) ĊĠĠĠ Ġval Ġinflater Ġ= Ġthis . layout Inflater ĊĠĠĠ Ġbuilder . setView ( in flater . inflate ( R . layout . popup _ loading , Ġnull )) ĊĠĠĠ Ġbuilder . set Cancel able ( true ) ĊĠĠĠ Ġalert Dialog Ġ= Ġbuilder . create () ĊĠĠĠ Ġalert Dialog . show () ĊĠĠĠ Ġreturn Ġalert Dialog Ċ } Ċ Ċ fun ĠActivity . dismiss Dialog ( alert Dialog : ĠAlertDialog ?) Ġ{ ĊĠĠĠ Ġalert Dialog ?. dismiss () Ċ } Ċ Ċ fun ĠFragment . start Loading (): AlertDialog Ġ{ ĊĠĠĠ Ġval Ġalert Dialog : ĠAlertDialog ĊĠĠĠ Ġval Ġbuilder Ġ= ĠAlertDialog . Builder ( require Context ()) ĊĠĠĠ Ġval Ġinflater Ġ= Ġrequire Activity (). layout Inflater ĊĠĠĠ Ġbuilder . setView ( in flater . inflate ( R . layout . popup _ loading , Ġnull )) ĊĠĠĠ Ġbuilder . set Cancel able ( true ) ĊĠĠĠ Ġalert Dialog Ġ= Ġbuilder . create () ĊĠĠĠ Ġalert Dialog . show () ĊĠĠĠ Ġreturn Ġalert Dialog Ċ } Ċ Ċ fun ĠFragment . dismiss Dialog ( alert Dialog : ĠAlertDialog ?) Ġ{ ĊĠĠĠ Ġalert Dialog ?. dismiss () Ċ }