I'm having a weird problem. When I try to update my DatePicker it
crashes, but I dont understand why. Via the debugger I could see the
date[] function is filled the way it should be.
Do you guys see the problem?
String[] date = dateofbirthNode.getStringValue().split(/); //
12/31/1969
Oh yes of course, here it is:
Error: null
java.lang.ArrayIndexOutOfBoundsException
at com.android.internal.widget.NumberPicker.updateView
(NumberPicker.java:238)
at com.android.internal.widget.NumberPicker.setCurrent
(NumberPicker.java:180)
at
You set the wrong values.
Instead of:
dateofbirthView.init(Integer.parseInt(date[2]), Integer.parseInt(date
[1]), Integer.parseInt(date[0]), null);
You must set:
dateofbirthView.init(Integer.parseInt(date[2]), Integer.parseInt(date
[0]), Integer.parseInt(date[1]), null);
First parameter is
3 matches
Mail list logo