Merge "Preventing aggregation suggestions from showing up on rotation"
diff --git a/src/com/android/contacts/datepicker/DatePicker.java b/src/com/android/contacts/datepicker/DatePicker.java
index 44a1d33..9c4ed40 100644
--- a/src/com/android/contacts/datepicker/DatePicker.java
+++ b/src/com/android/contacts/datepicker/DatePicker.java
@@ -37,7 +37,7 @@
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.NumberPicker;
-import android.widget.NumberPicker.OnChangedListener;
+import android.widget.NumberPicker.OnChangeListener;
import java.text.DateFormatSymbols;
import java.text.SimpleDateFormat;
@@ -106,9 +106,9 @@
mDayPicker = (NumberPicker) findViewById(R.id.day);
mDayPicker.setFormatter(NumberPicker.TWO_DIGIT_FORMATTER);
- mDayPicker.setSpeed(100);
- mDayPicker.setOnChangeListener(new OnChangedListener() {
- public void onChanged(NumberPicker picker, int oldVal, int newVal) {
+ mDayPicker.setOnLongPressUpdateInterval(100);
+ mDayPicker.setOnChangeListener(new OnChangeListener() {
+ public void onChange(NumberPicker picker, int oldVal, int newVal) {
mDay = newVal;
notifyDateChanged();
}
@@ -132,9 +132,9 @@
mMonthPicker.setRange(1, 12, months);
}
- mMonthPicker.setSpeed(200);
- mMonthPicker.setOnChangeListener(new OnChangedListener() {
- public void onChanged(NumberPicker picker, int oldVal, int newVal) {
+ mMonthPicker.setOnLongPressUpdateInterval(200);
+ mMonthPicker.setOnChangeListener(new OnChangeListener() {
+ public void onChange(NumberPicker picker, int oldVal, int newVal) {
/* We display the month 1-12 but store it 0-11 so always
* subtract by one to ensure our internal state is always 0-11
@@ -147,9 +147,9 @@
}
});
mYearPicker = (NumberPicker) findViewById(R.id.year);
- mYearPicker.setSpeed(100);
- mYearPicker.setOnChangeListener(new OnChangedListener() {
- public void onChanged(NumberPicker picker, int oldVal, int newVal) {
+ mYearPicker.setOnLongPressUpdateInterval(100);
+ mYearPicker.setOnChangeListener(new OnChangeListener() {
+ public void onChange(NumberPicker picker, int oldVal, int newVal) {
mYear = newVal;
// Adjust max day for leap years if needed
adjustMaxDay();