I have a numberpicker:
AlertDialog alertDialog = builder.create();
alertDialog.setTitle("Quantidade");
NumberPicker NP = (NumberPicker)view.findViewById(R.id.npicker);
NP.setMaxValue(1000);
NP.setMinValue(1);
alertDialog.setButton(...);
alertDialog.show();
This works fine on Android 4.0.x, but on Android 2.3.x I get
java.lang.NoSuchMethodError: android.widget.NumberPicker.setMaxValue
If I remove NP.setMaxValue(1000)
and NP.setMinValue(1)
, it works but the limits are set as 0, is there any way to set the number picker limits on Android 2.3.x?