I have a number picker set up with strings but I am having a problem with getting the string that is being displayed.
Here is the code for the construction of the number picker.
fractionPicker is my Number picker .
void fractionPickerFunction(){
final String[] arrayString= new String[]{"None", "1/8", "1/4", "3/8", "1/2", "5/8", "3/4", "7/8"};
fractionPicker.setMinValue(0);
fractionPicker.setMaxValue(arrayString.length-1);
fractionPicker.setFormatter(new NumberPicker.Formatter() {
@Override
public String format(int value) {
return arrayString[value];
}
});
}