Skip to content

Commit 0ba2d47

Browse files
CaptainSpamJean-Baptiste Queru
authored andcommitted
Fixed deserialization problem in DatePicker.
During onRestoreInstanceState for DatePicker, the internal state of the widget is restored properly (thus setting the internal year, month, and day), but the spinners aren't visually updated to that state immediately. That is to say, the internal state of the widget doesn't match the spinners in that case, which can cause confusion. Change-Id: I96d1a299d0ee159d41450470acb30a3bf6006d44
1 parent 5bc3005 commit 0ba2d47

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/java/android/widget/DatePicker.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ protected void onRestoreInstanceState(Parcelable state) {
316316
mYear = ss.getYear();
317317
mMonth = ss.getMonth();
318318
mDay = ss.getDay();
319+
updateSpinners();
319320
}
320321

321322
/**

0 commit comments

Comments
 (0)