I am trying to use the NumberPicker control. But I cannot find any clear examples of how it is used in java or Mono for Android.
Including it in my layout with the below code makes it appear but it doesn’t allow me to enter in a value > 0. The plus and minus buttons also don’t do anything. I also can’t seem to get a Reference to it inside the Activity… Is it not a part of Android.Widget?
<NumberPicker android:id="@+id/npWeight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
Can anyone please show me or point me to an example of using the NumberPicker control? Preferably in Mono for Android but java examples that can be translated easily to Mono for Android are welcome.
The NumberPicker type is present in API level 11 and later, so you need to set your
TargetFrameworkVersionto Android v3.1 (API level 12) or Android v4.0 (API level 14) in order to use the type.