This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Can't show Spinner DropDown list inside a dialog  RSS feed

 
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
 
Rancher
Posts: 43009
76
  • 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: 43009
76
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad to be of help :-)
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!