I'm trying to create a Spinner with integers values (1, 5, 10, etc.) I already have a Spinner with Strings and everything is working fine.
private static final String[] daysOfWeek = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
Spinner spinner_days =(Spinner)findViewById(R.id.spinner_days);
spinner_days.setOnItemSelectedListener(this);
ArrayAdapter<String> aa = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, daysOfWeek);
aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner_days.setAdapter(aa);
When I'm trying to do the same thing with
private static final int[] options = {1, 3, 5, 10, 15, 20, 30, 40, 45, 50, 60};
then I get an error when I try to create the ArrayAdapter because I think it's only possible to do that with a String array ?
Can someone please help me?
Thank you!