Spinner getting selected string

by matio » Sat, 17 Apr 2010 06:16:30 GMT


Sponsored Links
 Hi everyone, I'm trying to expand a todo list program taken from a
tutorial in a magazine. The problem I'm having is getting the value
from a spinner that is selecting the priority of the item, how do I do
it? I think it is something to do with views but how do I get the
string?

Thanks in advance...

--



Spinner getting selected string

by Bob Kerns » Sat, 17 Apr 2010 10:52:49 GMT


 You have a few options. You can ask the view for the position of the
selected item (getSelectedItemPosition()), or the ID you associated
with that item (getSelectedItemId()), or register listener with
setOnItemSelectedListener().

You can get the associated item with getSelectedItem(). You can get
the associated View with getSelectedView(), and you can extract
relevant state from that. You can also register listeners on items
within the view, if they will be changing state as the result of your
interactions with them.

Use whatever is simplest for your application.



>


Sponsored Links


Other Threads

1. Create an app to change lock screen.

Where is a good place to start if you want to create an app to
custimize the lock screen?  Is it possible in 2.0?  If anyone has any
tutorials in this area please pass them along.

Fabrizio

-- 

2. App idea. Database downloading of my products?

I already have a website that offers dvd product search. I'm thinking
of offering an app for our customers that, in additional to mobility,
will offer quicker searching than our website offers.  I'm wondering
if there is a practical way to allow Android phone users to download
our product database and search directly on their phone allowing
instantaneous search results? (avoiding a web search delay?)

Most of the searches are done using UPC search to query used dvds they
want to sell to us.

I don't see any apps on the market that allow this unless i am missing
it.

-- 

3. listen for / notify on widget removal?

4. are all Android 1.5 devices upgradable to 2.1

5. Monkey scripting

6. move a triangle...

7. UrlConnection does not support output