am 1048ad55: Merge change 24395 into eclair
Merge commit '1048ad554ac64224c864f52266b5839cd91d4ee5' into eclair-plus-aosp * commit '1048ad554ac64224c864f52266b5839cd91d4ee5': Make NumberPicker subclassable
This commit is contained in:
@@ -81,10 +81,10 @@ public class NumberPicker extends LinearLayout implements OnClickListener,
|
|||||||
private final InputFilter mNumberInputFilter;
|
private final InputFilter mNumberInputFilter;
|
||||||
|
|
||||||
private String[] mDisplayedValues;
|
private String[] mDisplayedValues;
|
||||||
private int mStart;
|
protected int mStart;
|
||||||
private int mEnd;
|
protected int mEnd;
|
||||||
private int mCurrent;
|
protected int mCurrent;
|
||||||
private int mPrevious;
|
protected int mPrevious;
|
||||||
private OnChangedListener mListener;
|
private OnChangedListener mListener;
|
||||||
private Formatter mFormatter;
|
private Formatter mFormatter;
|
||||||
private long mSpeed = 300;
|
private long mSpeed = 300;
|
||||||
@@ -206,7 +206,7 @@ public class NumberPicker extends LinearLayout implements OnClickListener,
|
|||||||
: String.valueOf(value);
|
: String.valueOf(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeCurrent(int current) {
|
protected void changeCurrent(int current) {
|
||||||
|
|
||||||
// Wrap around the values if we go past the start or end
|
// Wrap around the values if we go past the start or end
|
||||||
if (current > mEnd) {
|
if (current > mEnd) {
|
||||||
@@ -220,13 +220,13 @@ public class NumberPicker extends LinearLayout implements OnClickListener,
|
|||||||
updateView();
|
updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyChange() {
|
protected void notifyChange() {
|
||||||
if (mListener != null) {
|
if (mListener != null) {
|
||||||
mListener.onChanged(this, mPrevious, mCurrent);
|
mListener.onChanged(this, mPrevious, mCurrent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateView() {
|
protected void updateView() {
|
||||||
|
|
||||||
/* If we don't have displayed values then use the
|
/* If we don't have displayed values then use the
|
||||||
* current number else find the correct value in the
|
* current number else find the correct value in the
|
||||||
|
|||||||
Reference in New Issue
Block a user