• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The yes/no dialog box didn't display

 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have created a yes/ no a dialog box in my activity as the followings:

Could you please tell me what's the problem in my code because this dialog didn't display in my tablet ?
thank you in advance
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you expect the onClick() method to get called? Did you assign the MainActivity as an OnClickListener to something? If so, where? What lines of code get called? Have you run the application in debug mode? You can put a break statement in on the first line of the onClick() method then step through the method to see what lines get called and to see what the values of the variables are, so you can see why a particular path was taken. If you don't know how to do that, then you can use Log statements to determine what lines get executed and the values of variables.
 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find the problem, my code jsut miss this statement : and it's work
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic