• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Help with using a spinner please

ktUK

Newbie
I have followed some tutorials to get a spinner with 4 different options in my xml and that works fine on the emulator. What I want to do next is to multiply an EditText number by a different multiplier for each option on the Spinner.

What I'm usure how to do is exctract the selection from the spinner and change it into a double.

I have tried various methods similar to extracting data from an EditText but get lost when changing the different words into numbers. You may have spotted I'm trying to build a unit converter. If someone could point me towards a suitable tutorial (most don't seem to deal with numbers) I would be very grateful.

Thanks for all your help. Much appreciated.
 
Thanks for your quick reply. I don't think I explained that the Spinner contains different words not numbers. For example: grammes, pounds, ounces.

I don't understand how to change each word into a different number which I can use in my java file.

Thank you
 
Back
Top Bottom