OSDN Git Service

NumberPicker incorrectly shown for the old theme.
authorSvetoslav Ganov <svetoslavganov@google.com>
Wed, 30 Nov 2011 02:27:23 +0000 (18:27 -0800)
committerSvetoslav Ganov <svetoslavganov@google.com>
Wed, 30 Nov 2011 02:40:05 +0000 (18:40 -0800)
commit9f086d812ff04703de4b14e02a7702ba7c8acb33
treeb13524bd2b1b5fa6fb4b77d0f1aa0fa8fdbadf2c
parent50b2042502bc459b40430fe3b3b83d7d61e5daf9
NumberPicker incorrectly shown for the old theme.

1. NumberPicker is trying to greedily grow to its max size
   but if the max size is not specified the default value
   was the max integer which makes the widget get quite
   tall in some cases. Now the widget tries to reach the
   max size only if it has been specified.

2. NumberPicker was not computing its min width when the array
   of display values is set.

3. DatePicker' layout for the old Theme was adding a margin on
   the right of the group of spinners and if the calendar view
   is not shown the spinners were not centered. Added the spinners
   right margin to the left margin of the calendar view.

4. TimePickerDialog was using the wrong conext and was not dismissable
   on an outside touch. Same for the DatePickerDialog context.

bug:5646161

Change-Id: Ic15f9b3e6291b76493604230ceb4f783a04d4ac7
core/java/android/app/DatePickerDialog.java
core/java/android/app/TimePickerDialog.java
core/java/android/widget/NumberPicker.java
core/res/res/layout/date_picker.xml