Is there a way to use the Android NumberPicker widget for choosing strings instead of integers?
This worked for me.
public class YourClassName extends AppCompatActivity {
NumberPicker picker = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.your_activity_layout_file);
picker = (NumberPicker) findViewById(R.id.pickerId_From_your_Layout_file);
picker.setMinValue(0);
picker.setMaxValue(3);
picker.setDisplayedValues(new String[]{"English", "French","Kiswahili","عربى"});
}
}