diff options
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/widget/DatePicker.java | 4 | ||||
-rw-r--r-- | core/java/android/widget/NumberPicker.java | 12 | ||||
-rw-r--r-- | core/java/android/widget/TimePicker.java | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java index 9a451cc..261992b 100644 --- a/core/java/android/widget/DatePicker.java +++ b/core/java/android/widget/DatePicker.java @@ -28,7 +28,7 @@ import android.text.format.DateUtils; import android.util.AttributeSet; import android.util.SparseArray; import android.view.LayoutInflater; -import android.widget.NumberPicker.OnChangeListener; +import android.widget.NumberPicker.OnChangedListener; import java.text.SimpleDateFormat; import java.util.Calendar; @@ -97,7 +97,7 @@ public class DatePicker extends FrameLayout { .getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.date_picker, this, true); - OnChangeListener onChangeListener = new OnChangeListener() { + OnChangedListener onChangeListener = new OnChangedListener() { public void onChanged(NumberPicker picker, int oldVal, int newVal) { notifyDateChanged(); updateMiniMonth(); diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java index e5544e9..bdd2e2c 100644 --- a/core/java/android/widget/NumberPicker.java +++ b/core/java/android/widget/NumberPicker.java @@ -166,7 +166,7 @@ public class NumberPicker extends LinearLayout { /** * Listener to be notified upon current value change. */ - private OnChangeListener mOnChangeListener; + private OnChangedListener mOnChangedListener; /** * Listener to be notified upon scroll state change. @@ -320,7 +320,7 @@ public class NumberPicker extends LinearLayout { /** * The callback interface used to indicate the number value has changed. */ - public interface OnChangeListener { + public interface OnChangedListener { /** * @param picker The NumberPicker associated with this listener. * @param oldVal The previous value. @@ -740,8 +740,8 @@ public class NumberPicker extends LinearLayout { * * @param onChangeListener the callback, should not be null. */ - public void setOnChangeListener(OnChangeListener onChangeListener) { - mOnChangeListener = onChangeListener; + public void setOnChangeListener(OnChangedListener onChangeListener) { + mOnChangedListener = onChangeListener; } /** @@ -1238,8 +1238,8 @@ public class NumberPicker extends LinearLayout { * NumberPicker. */ private void notifyChange(int previous, int current) { - if (mOnChangeListener != null) { - mOnChangeListener.onChanged(this, previous, mCurrent); + if (mOnChangedListener != null) { + mOnChangedListener.onChanged(this, previous, mCurrent); } } diff --git a/core/java/android/widget/TimePicker.java b/core/java/android/widget/TimePicker.java index 24b5e4a..e66eb8d 100644 --- a/core/java/android/widget/TimePicker.java +++ b/core/java/android/widget/TimePicker.java @@ -25,7 +25,7 @@ import android.os.Parcelable; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; -import android.widget.NumberPicker.OnChangeListener; +import android.widget.NumberPicker.OnChangedListener; import java.text.DateFormatSymbols; import java.util.Calendar; @@ -110,7 +110,7 @@ public class TimePicker extends FrameLayout { // hour mHourPicker = (NumberPicker) findViewById(R.id.hour); - mHourPicker.setOnChangeListener(new NumberPicker.OnChangeListener() { + mHourPicker.setOnChangeListener(new NumberPicker.OnChangedListener() { public void onChanged(NumberPicker spinner, int oldVal, int newVal) { mCurrentHour = newVal; if (!mIs24HourView) { @@ -137,7 +137,7 @@ public class TimePicker extends FrameLayout { mMinutePicker.setRange(0, 59); mMinutePicker.setSpeed(100); mMinutePicker.setFormatter(NumberPicker.TWO_DIGIT_FORMATTER); - mMinutePicker.setOnChangeListener(new NumberPicker.OnChangeListener() { + mMinutePicker.setOnChangeListener(new NumberPicker.OnChangedListener() { public void onChanged(NumberPicker spinner, int oldVal, int newVal) { mCurrentMinute = newVal; onTimeChanged(); @@ -146,7 +146,7 @@ public class TimePicker extends FrameLayout { // am/pm mAmPmPicker = (NumberPicker) findViewById(R.id.amPm); - mAmPmPicker.setOnChangeListener(new OnChangeListener() { + mAmPmPicker.setOnChangeListener(new OnChangedListener() { public void onChanged(NumberPicker picker, int oldVal, int newVal) { picker.requestFocus(); if (mIsAm) { |