I initialize a spinner with an ArrayAdapter<String>, then save the
choosed value into database.
Next, when I query the value (USD) from database, I don't how to set
"USD" into Spinner as default value.

It always display "RMB" as default value now, I don't kown there is
any API which i could change it with "USD".

E.g.
private static final String sCurrencyType[] = { "RMB", "USD",  "JPY",
"EUR","CAD", "AUD", GBP" };

Set Adapter

        ArrayAdapter<String> adapter;
        adapter = new ArrayAdapter<String>(this,
                                android.R.layout.simple_spinner_item, 
sCurrencyType);
        adapter.setDropDownViewResource
(android.R.layout.simple_spinner_dropdown_item);
        spinner.setAdapter(adapter)

Is there anyone who have the same question like mine?

Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to