diff options
Diffstat (limited to 'core/java/android/widget/SimpleMonthAdapter.java')
| -rw-r--r-- | core/java/android/widget/SimpleMonthAdapter.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/java/android/widget/SimpleMonthAdapter.java b/core/java/android/widget/SimpleMonthAdapter.java index 24ebb2cd7e66..c807d560968f 100644 --- a/core/java/android/widget/SimpleMonthAdapter.java +++ b/core/java/android/widget/SimpleMonthAdapter.java @@ -39,6 +39,7 @@ class SimpleMonthAdapter extends BaseAdapter { private Calendar mSelectedDay = Calendar.getInstance(); private ColorStateList mCalendarTextColors = ColorStateList.valueOf(Color.BLACK); + private ColorStateList mCalendarDayBackgroundColor = ColorStateList.valueOf(Color.MAGENTA); private OnDaySelectedListener mOnDaySelectedListener; private int mFirstDayOfWeek; @@ -88,6 +89,10 @@ class SimpleMonthAdapter extends BaseAdapter { mCalendarTextColors = colors; } + void setCalendarDayBackgroundColor(ColorStateList dayBackgroundColor) { + mCalendarDayBackgroundColor = dayBackgroundColor; + } + /** * Sets the text color, size, style, hint color, and highlight color from * the specified TextAppearance resource. This is mostly copied from @@ -144,9 +149,11 @@ class SimpleMonthAdapter extends BaseAdapter { v.setClickable(true); v.setOnDayClickListener(mOnDayClickListener); - if (mCalendarTextColors != null) { - v.setTextColor(mCalendarTextColors); - } + v.setMonthTextColor(mCalendarTextColors); + v.setDayOfWeekTextColor(mCalendarTextColors); + v.setDayTextColor(mCalendarTextColors); + + v.setDayBackgroundColor(mCalendarDayBackgroundColor); } final int minMonth = mMinDate.get(Calendar.MONTH); |
