timoschloesser timoschloesser - 4 months ago 29
Android Question

Using NumberPicker Widget with Strings

Is there a way to use the Android NumberPicker widget for choosing strings instead of integers?

nan nan
Answer
NumberPicker picker = new NumberPicker(this);
picker.setMinValue(0);
picker.setMaxValue(2);
picker.setDisplayedValues( new String[] { "Belgium", "France", "United Kingdom" } );