OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea00266
)
Force-commit changes on accept in spinner-style DatePickerDialog
author
Alan Viverette
<alanv@google.com>
Wed, 14 Jan 2015 01:34:17 +0000
(17:34 -0800)
committer
Alan Viverette
<alanv@google.com>
Wed, 14 Jan 2015 01:34:17 +0000
(17:34 -0800)
Bug:
19005472
Change-Id: If500c7305282a5055b4617c242871e04d91c0bc3
core/java/android/app/DatePickerDialog.java
patch
|
blob
|
history
diff --git
a/core/java/android/app/DatePickerDialog.java
b/core/java/android/app/DatePickerDialog.java
index
f79d32b
..
3fbbdff
100644
(file)
--- a/
core/java/android/app/DatePickerDialog.java
+++ b/
core/java/android/app/DatePickerDialog.java
@@
-131,6
+131,9
@@
public class DatePickerDialog extends AlertDialog implements OnClickListener,
switch (which) {
case BUTTON_POSITIVE:
if (mDateSetListener != null) {
+ // Clearing focus forces the dialog to commit any pending
+ // changes, e.g. typed text in a NumberPicker.
+ mDatePicker.clearFocus();
mDateSetListener.onDateSet(mDatePicker, mDatePicker.getYear(),
mDatePicker.getMonth(), mDatePicker.getDayOfMonth());
}