I’m working on an Android application that requires a NumberPicker widget, the widget behind the DatePicker. Luckily, I’m not the only one and QuietlyCoding shows us how to clone and use the NumberPicker widget.
Then I started using the NumberPicker and I found out that not all is working as I would like to see. There are 2 things bugging me:
- Entering numbers via the EditText (mText widget) do not stick. The mCurrent variable is not updated.
- Variables are entered twice, entering a ‘2’ via the EditText widgets results in ’22’ being displayed.
I’m not sure yet what to do but I think I need to write my own NumberPicker or update the existing one, one that
- looks like the real NumberPicker widget.
- Behaves like the real NumberPicker (well… partly).
- Accepts data from the EditText widget.
- Does not use the ‘mDisplayedValues’. (I think this is implemented to support the DatePicker)