Loading core/java/android/widget/CalendarView.java +52 −0 Original line number Diff line number Diff line Loading @@ -421,6 +421,8 @@ public class CalendarView extends FrameLayout { * Sets the number of weeks to be shown. * * @param count The shown week count. * * @attr ref android.R.styleable#CalendarView_shownWeekCount */ public void setShownWeekCount(int count) { if (mShownWeekCount != count) { Loading @@ -433,6 +435,8 @@ public class CalendarView extends FrameLayout { * Gets the number of weeks to be shown. * * @return The shown week count. * * @attr ref android.R.styleable#CalendarView_shownWeekCount */ public int getShownWeekCount() { return mShownWeekCount; Loading @@ -442,6 +446,8 @@ public class CalendarView extends FrameLayout { * Sets the background color for the selected week. * * @param color The week background color. * * @attr ref android.R.styleable#CalendarView_selectedWeekBackgroundColor */ public void setSelectedWeekBackgroundColor(int color) { if (mSelectedWeekBackgroundColor != color) { Loading @@ -460,6 +466,8 @@ public class CalendarView extends FrameLayout { * Gets the background color for the selected week. * * @return The week background color. * * @attr ref android.R.styleable#CalendarView_selectedWeekBackgroundColor */ public int getSelectedWeekBackgroundColor() { return mSelectedWeekBackgroundColor; Loading @@ -469,6 +477,8 @@ public class CalendarView extends FrameLayout { * Sets the color for the dates of the focused month. * * @param color The focused month date color. * * @attr ref android.R.styleable#CalendarView_focusedMonthDateColor */ public void setFocusedMonthDateColor(int color) { if (mFocusedMonthDateColor != color) { Loading @@ -487,6 +497,8 @@ public class CalendarView extends FrameLayout { * Gets the color for the dates in the focused month. * * @return The focused month date color. * * @attr ref android.R.styleable#CalendarView_focusedMonthDateColor */ public int getFocusedMonthDateColor() { return mFocusedMonthDateColor; Loading @@ -496,6 +508,8 @@ public class CalendarView extends FrameLayout { * Sets the color for the dates of a not focused month. * * @param color A not focused month date color. * * @attr ref android.R.styleable#CalendarView_unfocusedMonthDateColor */ public void setUnfocusedMonthDateColor(int color) { if (mUnfocusedMonthDateColor != color) { Loading @@ -514,6 +528,8 @@ public class CalendarView extends FrameLayout { * Gets the color for the dates in a not focused month. * * @return A not focused month date color. * * @attr ref android.R.styleable#CalendarView_unfocusedMonthDateColor */ public int getUnfocusedMonthDateColor() { return mFocusedMonthDateColor; Loading @@ -523,6 +539,8 @@ public class CalendarView extends FrameLayout { * Sets the color for the week numbers. * * @param color The week number color. * * @attr ref android.R.styleable#CalendarView_weekNumberColor */ public void setWeekNumberColor(int color) { if (mWeekNumberColor != color) { Loading @@ -537,6 +555,8 @@ public class CalendarView extends FrameLayout { * Gets the color for the week numbers. * * @return The week number color. * * @attr ref android.R.styleable#CalendarView_weekNumberColor */ public int getWeekNumberColor() { return mWeekNumberColor; Loading @@ -546,6 +566,8 @@ public class CalendarView extends FrameLayout { * Sets the color for the separator line between weeks. * * @param color The week separator color. * * @attr ref android.R.styleable#CalendarView_weekSeparatorLineColor */ public void setWeekSeparatorLineColor(int color) { if (mWeekSeparatorLineColor != color) { Loading @@ -558,6 +580,8 @@ public class CalendarView extends FrameLayout { * Gets the color for the separator line between weeks. * * @return The week separator color. * * @attr ref android.R.styleable#CalendarView_weekSeparatorLineColor */ public int getWeekSeparatorLineColor() { return mWeekSeparatorLineColor; Loading @@ -568,6 +592,8 @@ public class CalendarView extends FrameLayout { * the end of the selected date. * * @param resourceId The vertical bar drawable resource id. * * @attr ref android.R.styleable#CalendarView_selectedDateVerticalBar */ public void setSelectedDateVerticalBar(int resourceId) { Drawable drawable = getResources().getDrawable(resourceId); Loading @@ -579,6 +605,8 @@ public class CalendarView extends FrameLayout { * the end of the selected date. * * @param drawable The vertical bar drawable. * * @attr ref android.R.styleable#CalendarView_selectedDateVerticalBar */ public void setSelectedDateVerticalBar(Drawable drawable) { if (mSelectedDateVerticalBar != drawable) { Loading Loading @@ -607,6 +635,8 @@ public class CalendarView extends FrameLayout { * Sets the text appearance for the week day abbreviation of the calendar header. * * @param resourceId The text appearance resource id. * * @attr ref android.R.styleable#CalendarView_weekDayTextAppearance */ public void setWeekDayTextAppearance(int resourceId) { if (mWeekDayTextAppearanceResId != resourceId) { Loading @@ -619,6 +649,8 @@ public class CalendarView extends FrameLayout { * Gets the text appearance for the week day abbreviation of the calendar header. * * @return The text appearance resource id. * * @attr ref android.R.styleable#CalendarView_weekDayTextAppearance */ public int getWeekDayTextAppearance() { return mWeekDayTextAppearanceResId; Loading @@ -628,6 +660,8 @@ public class CalendarView extends FrameLayout { * Sets the text appearance for the calendar dates. * * @param resourceId The text appearance resource id. * * @attr ref android.R.styleable#CalendarView_dateTextAppearance */ public void setDateTextAppearance(int resourceId) { if (mDateTextAppearanceResId != resourceId) { Loading @@ -641,6 +675,8 @@ public class CalendarView extends FrameLayout { * Gets the text appearance for the calendar dates. * * @return The text appearance resource id. * * @attr ref android.R.styleable#CalendarView_dateTextAppearance */ public int getDateTextAppearance() { return mDateTextAppearanceResId; Loading Loading @@ -683,6 +719,8 @@ public class CalendarView extends FrameLayout { * <p> * * @return The minimal supported date. * * @attr ref android.R.styleable#CalendarView_minDate */ public long getMinDate() { return mMinDate.getTimeInMillis(); Loading @@ -694,6 +732,8 @@ public class CalendarView extends FrameLayout { * zone. * * @param minDate The minimal supported date. * * @attr ref android.R.styleable#CalendarView_minDate */ public void setMinDate(long minDate) { mTempDate.setTimeInMillis(minDate); Loading Loading @@ -731,6 +771,8 @@ public class CalendarView extends FrameLayout { * <p> * * @return The maximal supported date. * * @attr ref android.R.styleable#CalendarView_maxDate */ public long getMaxDate() { return mMaxDate.getTimeInMillis(); Loading @@ -742,6 +784,8 @@ public class CalendarView extends FrameLayout { * zone. * * @param maxDate The maximal supported date. * * @attr ref android.R.styleable#CalendarView_maxDate */ public void setMaxDate(long maxDate) { mTempDate.setTimeInMillis(maxDate); Loading @@ -767,6 +811,8 @@ public class CalendarView extends FrameLayout { * Sets whether to show the week number. * * @param showWeekNumber True to show the week number. * * @attr ref android.R.styleable#CalendarView_showWeekNumber */ public void setShowWeekNumber(boolean showWeekNumber) { if (mShowWeekNumber == showWeekNumber) { Loading @@ -781,6 +827,8 @@ public class CalendarView extends FrameLayout { * Gets whether to show the week number. * * @return True if showing the week number. * * @attr ref android.R.styleable#CalendarView_showWeekNumber */ public boolean getShowWeekNumber() { return mShowWeekNumber; Loading @@ -798,6 +846,8 @@ public class CalendarView extends FrameLayout { * @see Calendar#FRIDAY * @see Calendar#SATURDAY * @see Calendar#SUNDAY * * @attr ref android.R.styleable#CalendarView_firstDayOfWeek */ public int getFirstDayOfWeek() { return mFirstDayOfWeek; Loading @@ -815,6 +865,8 @@ public class CalendarView extends FrameLayout { * @see Calendar#FRIDAY * @see Calendar#SATURDAY * @see Calendar#SUNDAY * * @attr ref android.R.styleable#CalendarView_firstDayOfWeek */ public void setFirstDayOfWeek(int firstDayOfWeek) { if (mFirstDayOfWeek == firstDayOfWeek) { Loading Loading
core/java/android/widget/CalendarView.java +52 −0 Original line number Diff line number Diff line Loading @@ -421,6 +421,8 @@ public class CalendarView extends FrameLayout { * Sets the number of weeks to be shown. * * @param count The shown week count. * * @attr ref android.R.styleable#CalendarView_shownWeekCount */ public void setShownWeekCount(int count) { if (mShownWeekCount != count) { Loading @@ -433,6 +435,8 @@ public class CalendarView extends FrameLayout { * Gets the number of weeks to be shown. * * @return The shown week count. * * @attr ref android.R.styleable#CalendarView_shownWeekCount */ public int getShownWeekCount() { return mShownWeekCount; Loading @@ -442,6 +446,8 @@ public class CalendarView extends FrameLayout { * Sets the background color for the selected week. * * @param color The week background color. * * @attr ref android.R.styleable#CalendarView_selectedWeekBackgroundColor */ public void setSelectedWeekBackgroundColor(int color) { if (mSelectedWeekBackgroundColor != color) { Loading @@ -460,6 +466,8 @@ public class CalendarView extends FrameLayout { * Gets the background color for the selected week. * * @return The week background color. * * @attr ref android.R.styleable#CalendarView_selectedWeekBackgroundColor */ public int getSelectedWeekBackgroundColor() { return mSelectedWeekBackgroundColor; Loading @@ -469,6 +477,8 @@ public class CalendarView extends FrameLayout { * Sets the color for the dates of the focused month. * * @param color The focused month date color. * * @attr ref android.R.styleable#CalendarView_focusedMonthDateColor */ public void setFocusedMonthDateColor(int color) { if (mFocusedMonthDateColor != color) { Loading @@ -487,6 +497,8 @@ public class CalendarView extends FrameLayout { * Gets the color for the dates in the focused month. * * @return The focused month date color. * * @attr ref android.R.styleable#CalendarView_focusedMonthDateColor */ public int getFocusedMonthDateColor() { return mFocusedMonthDateColor; Loading @@ -496,6 +508,8 @@ public class CalendarView extends FrameLayout { * Sets the color for the dates of a not focused month. * * @param color A not focused month date color. * * @attr ref android.R.styleable#CalendarView_unfocusedMonthDateColor */ public void setUnfocusedMonthDateColor(int color) { if (mUnfocusedMonthDateColor != color) { Loading @@ -514,6 +528,8 @@ public class CalendarView extends FrameLayout { * Gets the color for the dates in a not focused month. * * @return A not focused month date color. * * @attr ref android.R.styleable#CalendarView_unfocusedMonthDateColor */ public int getUnfocusedMonthDateColor() { return mFocusedMonthDateColor; Loading @@ -523,6 +539,8 @@ public class CalendarView extends FrameLayout { * Sets the color for the week numbers. * * @param color The week number color. * * @attr ref android.R.styleable#CalendarView_weekNumberColor */ public void setWeekNumberColor(int color) { if (mWeekNumberColor != color) { Loading @@ -537,6 +555,8 @@ public class CalendarView extends FrameLayout { * Gets the color for the week numbers. * * @return The week number color. * * @attr ref android.R.styleable#CalendarView_weekNumberColor */ public int getWeekNumberColor() { return mWeekNumberColor; Loading @@ -546,6 +566,8 @@ public class CalendarView extends FrameLayout { * Sets the color for the separator line between weeks. * * @param color The week separator color. * * @attr ref android.R.styleable#CalendarView_weekSeparatorLineColor */ public void setWeekSeparatorLineColor(int color) { if (mWeekSeparatorLineColor != color) { Loading @@ -558,6 +580,8 @@ public class CalendarView extends FrameLayout { * Gets the color for the separator line between weeks. * * @return The week separator color. * * @attr ref android.R.styleable#CalendarView_weekSeparatorLineColor */ public int getWeekSeparatorLineColor() { return mWeekSeparatorLineColor; Loading @@ -568,6 +592,8 @@ public class CalendarView extends FrameLayout { * the end of the selected date. * * @param resourceId The vertical bar drawable resource id. * * @attr ref android.R.styleable#CalendarView_selectedDateVerticalBar */ public void setSelectedDateVerticalBar(int resourceId) { Drawable drawable = getResources().getDrawable(resourceId); Loading @@ -579,6 +605,8 @@ public class CalendarView extends FrameLayout { * the end of the selected date. * * @param drawable The vertical bar drawable. * * @attr ref android.R.styleable#CalendarView_selectedDateVerticalBar */ public void setSelectedDateVerticalBar(Drawable drawable) { if (mSelectedDateVerticalBar != drawable) { Loading Loading @@ -607,6 +635,8 @@ public class CalendarView extends FrameLayout { * Sets the text appearance for the week day abbreviation of the calendar header. * * @param resourceId The text appearance resource id. * * @attr ref android.R.styleable#CalendarView_weekDayTextAppearance */ public void setWeekDayTextAppearance(int resourceId) { if (mWeekDayTextAppearanceResId != resourceId) { Loading @@ -619,6 +649,8 @@ public class CalendarView extends FrameLayout { * Gets the text appearance for the week day abbreviation of the calendar header. * * @return The text appearance resource id. * * @attr ref android.R.styleable#CalendarView_weekDayTextAppearance */ public int getWeekDayTextAppearance() { return mWeekDayTextAppearanceResId; Loading @@ -628,6 +660,8 @@ public class CalendarView extends FrameLayout { * Sets the text appearance for the calendar dates. * * @param resourceId The text appearance resource id. * * @attr ref android.R.styleable#CalendarView_dateTextAppearance */ public void setDateTextAppearance(int resourceId) { if (mDateTextAppearanceResId != resourceId) { Loading @@ -641,6 +675,8 @@ public class CalendarView extends FrameLayout { * Gets the text appearance for the calendar dates. * * @return The text appearance resource id. * * @attr ref android.R.styleable#CalendarView_dateTextAppearance */ public int getDateTextAppearance() { return mDateTextAppearanceResId; Loading Loading @@ -683,6 +719,8 @@ public class CalendarView extends FrameLayout { * <p> * * @return The minimal supported date. * * @attr ref android.R.styleable#CalendarView_minDate */ public long getMinDate() { return mMinDate.getTimeInMillis(); Loading @@ -694,6 +732,8 @@ public class CalendarView extends FrameLayout { * zone. * * @param minDate The minimal supported date. * * @attr ref android.R.styleable#CalendarView_minDate */ public void setMinDate(long minDate) { mTempDate.setTimeInMillis(minDate); Loading Loading @@ -731,6 +771,8 @@ public class CalendarView extends FrameLayout { * <p> * * @return The maximal supported date. * * @attr ref android.R.styleable#CalendarView_maxDate */ public long getMaxDate() { return mMaxDate.getTimeInMillis(); Loading @@ -742,6 +784,8 @@ public class CalendarView extends FrameLayout { * zone. * * @param maxDate The maximal supported date. * * @attr ref android.R.styleable#CalendarView_maxDate */ public void setMaxDate(long maxDate) { mTempDate.setTimeInMillis(maxDate); Loading @@ -767,6 +811,8 @@ public class CalendarView extends FrameLayout { * Sets whether to show the week number. * * @param showWeekNumber True to show the week number. * * @attr ref android.R.styleable#CalendarView_showWeekNumber */ public void setShowWeekNumber(boolean showWeekNumber) { if (mShowWeekNumber == showWeekNumber) { Loading @@ -781,6 +827,8 @@ public class CalendarView extends FrameLayout { * Gets whether to show the week number. * * @return True if showing the week number. * * @attr ref android.R.styleable#CalendarView_showWeekNumber */ public boolean getShowWeekNumber() { return mShowWeekNumber; Loading @@ -798,6 +846,8 @@ public class CalendarView extends FrameLayout { * @see Calendar#FRIDAY * @see Calendar#SATURDAY * @see Calendar#SUNDAY * * @attr ref android.R.styleable#CalendarView_firstDayOfWeek */ public int getFirstDayOfWeek() { return mFirstDayOfWeek; Loading @@ -815,6 +865,8 @@ public class CalendarView extends FrameLayout { * @see Calendar#FRIDAY * @see Calendar#SATURDAY * @see Calendar#SUNDAY * * @attr ref android.R.styleable#CalendarView_firstDayOfWeek */ public void setFirstDayOfWeek(int firstDayOfWeek) { if (mFirstDayOfWeek == firstDayOfWeek) { Loading