diff options
author | Alan Viverette <alanv@google.com> | 2014-10-24 14:34:26 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2014-10-24 14:37:29 -0700 |
commit | 50eb025c2fea7e364e0be951ce8ba6ca605f901a (patch) | |
tree | 2c61860100aafc3adfef66a5912fa2204aa6e892 /core/java/android/widget/SimpleMonthView.java | |
parent | cc66a236f90cbef7f9562b4179c3aec517f4f082 (diff) | |
download | frameworks_base-50eb025c2fea7e364e0be951ce8ba6ca605f901a.zip frameworks_base-50eb025c2fea7e364e0be951ce8ba6ca605f901a.tar.gz frameworks_base-50eb025c2fea7e364e0be951ce8ba6ca605f901a.tar.bz2 |
Fix min/max date range in DatePicker calendar mode
Also cleans abstraction of various day/year pickers and adapters.
BUG: 18104457
Change-Id: Ifde664788d8123a3123303940bac63c1350c2cd7
Diffstat (limited to 'core/java/android/widget/SimpleMonthView.java')
-rw-r--r-- | core/java/android/widget/SimpleMonthView.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/core/java/android/widget/SimpleMonthView.java b/core/java/android/widget/SimpleMonthView.java index 59baaba..d2a37ac 100644 --- a/core/java/android/widget/SimpleMonthView.java +++ b/core/java/android/widget/SimpleMonthView.java @@ -52,8 +52,6 @@ import java.util.Locale; * within the specified month. */ class SimpleMonthView extends View { - private static final String TAG = "SimpleMonthView"; - private static final int DEFAULT_HEIGHT = 32; private static final int MIN_HEIGHT = 10; @@ -67,15 +65,15 @@ class SimpleMonthView extends View { private static final int DAY_SEPARATOR_WIDTH = 1; + private final Formatter mFormatter; + private final StringBuilder mStringBuilder; + private final int mMiniDayNumberTextSize; private final int mMonthLabelTextSize; private final int mMonthDayLabelTextSize; private final int mMonthHeaderSize; private final int mDaySelectedCircleSize; - // used for scaling to the device density - private static float mScale = 0; - /** Single-letter (when available) formatter for the day of week label. */ private SimpleDateFormat mDayFormatter = new SimpleDateFormat("EEEEE", Locale.getDefault()); @@ -92,9 +90,6 @@ class SimpleMonthView extends View { private Paint mMonthTitlePaint; private Paint mMonthDayLabelPaint; - private final Formatter mFormatter; - private final StringBuilder mStringBuilder; - private int mMonth; private int mYear; @@ -155,11 +150,14 @@ class SimpleMonthView extends View { this(context, attrs, R.attr.datePickerStyle); } - public SimpleMonthView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs); + public SimpleMonthView(Context context, AttributeSet attrs, int defStyleAttr) { + this(context, attrs, defStyleAttr, 0); + } - final Resources res = context.getResources(); + public SimpleMonthView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + final Resources res = context.getResources(); mDayOfWeekTypeface = res.getString(R.string.day_of_week_label_typeface); mMonthTitleTypeface = res.getString(R.string.sans_serif); |