saikek saikek - 2 months ago 21
Android Question

Put ENUM values to android spinner?

For example: I have an enum with days.

How do I put its values into spinner ?

Answer

Some kind of walkthrough is using:

Spinner mySpinner = (Spinner) findViewById(R.id.cmbClothType);
mySpinner.setAdapter(new ArrayAdapter<MyType>(this, android.R.layout.simple_list_item, MyType.values()));
Comments