Android equivalent to html select tag

in html you have the select tag. Options allow you to display some string to the user and send a different value, possibly numeric, to the business logic code.

I am new to android and i’ve found Spinner. Sadly it seems it only handles the label shown to the user. On the internet i’ve found some fixes, like manually setting up a map that relates String labels to their respective numeric codes. Is there an out of the box component that works in the same fine way select/option does?

thank you

Maybe this will help: http://stackoverflow.com/questions/24712540/set-key-and-value-in-spinner . There is pretty solid explanation how to do it in 2 different ways (using either list of Plain Old Java Object aka POJO classes or HashMap).

Cheers,
TeNDoLLA

hy tendolla, that’s precisely the link i am working with. cheers.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.