• Post Reply Bookmark Topic Watch Topic
  • New Topic

Coding Multiple-choice List Dialogs  RSS feed

 
Mark Do
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


From the code above, An alertdialog would pop up prompting the user to select a region (from a list). the user will then be allowed to select multiple choices accordingly. If I choose to select anything, the app crashes. Any ideas how to mitigate this problem?

I know that I have to use a conditional check like if (isChecked){}; but I don't know how to do it. I want it to pop up a dialog box when none is checked prompting them that they should select atleast one.

Thanks,
Mark
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We need lots more detail than that. What sort of error message do you receive?
 
Mark Do
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, the app just crashes and closed off....
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I that case you will have to divide and rule. What happens when you read the entire text file with the same technique, without the GUI?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!