I have this AlertDialog that should be a duel between two players. It shows an image of a duel and after three seconds, thanks to a timer, it shows a \"BANG\" image. When the \"
You need to call the
showDialog(int)method.
Then override the method
onCreateDialog(int) inside this create the dialog and set the positive and negative buttons and then it will work.
Though this way is deprecated. You should use fragments now. But still you can give it a try!
Check this link: https://developer.android.com/guide/topics/ui/dialogs.html