Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't show Spinner DropDown list inside a dialog

 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a button "settings", when i click in, a dialog dispaly for authentication.
I just make a test, if the edit text is empty the dialog dismiss else another dialog box display which contains a spinner.
Here's the code:

The problem is when i click in a login button the second dialog didn't display.
Should you tell me what's wrong in my code ?
 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need a solution please
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PatienceIsAVirtue.

Have you ascertained which lines of code are or are not being executed? For example, is line 22 being executed? How about line 38? Are there any exceptions in the logcat?

Right off the bat I notice that the code is looking for the spinner in layout of the activity (like 34) - I thought the spinner was supposed to be part of a dialog?
 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solve it,
i just change this spinner = (Spinner)findViewById(R.id.languagespinner);by this spinner = (Spinner)settingdialog.findViewById(R.id.languagespinner);
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad to be of help :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic