Here is the content of the file /res/values/array.xml :
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<array name="filter_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
</array>
</resources>
The java code associated is :
Spinner valMinSLot = (Spinner)
findViewById(R.id.s1_filter_min_slot_val)
ArrayAdapter<CharSequence> adapter =
ArrayAdapter.createFromResource(this, R.array.filter_values,
android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
valMinSLot.setAdapter(adapter);
The values I have in my spinners are .... the path of the files
present under res/drawable. It means a list of png files !
If in my array I add a character (such as "i") then the values in my
spinner are correct (1i, 2i, ..Etc).
I have this bug under :
OS : windows XP family edition - SP2
JVM : java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
SDK : android-sdk_m5-rc15_windows
I hope this could help the community.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---