Someone has tried to use a Spinner view in a dialog? In the M5
version, the field list which is shown, is bad localized in the
screen.
I don know if it is a bug or if I am missing something in my code
which is very simple:
XML (R.layout.dosage)
<Spinner android:id="@+id/dosage_unit"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
JAVA
Dialog d = new Dialog(v.getContext());
d.setContentView(R.layout.dosage);
//find view
dosageUnit = (Spinner)d.findViewById(R.id.dosage_unit);
//set the spinner adapter
ArrayAdapter<CharSequence> unitList =
ArrayAdapter.createFromResource(v.getContext(), R.array.units,
android.R.layout.simple_spinner_dropdown_item);
dosageUnit.setAdapter(unitList);
//show dialog
d.show();
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---