안드로이드 기본 캘린더는 커스텀이 되지 않는데 Materialcalendar를 사용하면 캘린더를 커스텀 할수있다.
아래는 Materialcalendar의 API이다
com.prolificinteractive.materialcalendarview
Class CalendarDay
- java.lang.Object
-
- com.prolificinteractive.materialcalendarview.CalendarDay
- All Implemented Interfaces:android.os.Parcelable
public final class CalendarDay extends java.lang.Object implements android.os.ParcelableAn imputable representation of a day on a calendar
-
- Nested Class Summary
- Nested classes/interfaces inherited from interface android.os.Parcelableandroid.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
- Field SummaryFieldsModifier and TypeField and Description
static android.os.Parcelable.Creator<CalendarDay> CREATOR - Fields inherited from interface android.os.ParcelableCONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
- Constructor SummaryConstructorsConstructor and Description
CalendarDay()Deprecated. CalendarDay(java.util.Calendar calendar)Deprecated. CalendarDay(java.util.Date date)Deprecated. CalendarDay(int year, int month, int day)Deprecated. CalendarDay(android.os.Parcel in)
- Method SummaryAll MethodsStatic MethodsInstance MethodsConcrete MethodsModifier and TypeMethod and Description
void copyTo(java.util.Calendar calendar)Copy this day's information to the given calendar instance int describeContents() boolean equals(java.lang.Object o) static CalendarDay from(java.util.Calendar calendar)Get a new instance set to the specified day static CalendarDay from(java.util.Date date)Get a new instance set to the specified day static CalendarDay from(int year, int month, int day)Get a new instance set to the specified day java.util.Calendar getCalendar()Get this day as a Calendar java.util.Date getDate()Get this day as a Date int getDay()Get the day int getMonth()Get the month, represented by values from Calendar int getYear()Get the year int hashCode() boolean isAfter(CalendarDay other)Determine if this day is after the given instance boolean isBefore(CalendarDay other)Determine if this day is before the given instance boolean isInRange(CalendarDay minDate, CalendarDay maxDate)Determine if this day is within a specified range static CalendarDay today()Get a new instance set to today java.lang.String toString() void writeToParcel(android.os.Parcel dest, int flags) - Methods inherited from class java.lang.ObjectgetClass, notify, notifyAll, wait, wait, wait
- Nested Class Summary
-
- Field Detail
- CREATORpublic static final android.os.Parcelable.Creator<CalendarDay> CREATOR
- Constructor Detail
- CalendarDay@Deprecated public CalendarDay()Deprecated. See Also:today()
- Initialized to the current day
- CalendarDay@Deprecated public CalendarDay(java.util.Calendar calendar)Deprecated. Parameters:calendar - source to pull date information from for this instanceSee Also:from(Calendar)
- CalendarDay@Deprecated public CalendarDay(int year, int month, int day)Deprecated. Parameters:year - new instance's yearmonth - new instance's month as defined by Calendarday - new instance's day of monthSee Also:from(Calendar)
- CalendarDay@Deprecated public CalendarDay(java.util.Date date)Deprecated. Parameters:date - source to pull date information from for this instanceSee Also:from(Date)
- CalendarDaypublic CalendarDay(android.os.Parcel in)
- Method Detail
- today@NonNull public static CalendarDay today()Get a new instance set to todayReturns:CalendarDay set to today's date
- from@NonNull public static CalendarDay from(int year, int month, int day)Get a new instance set to the specified dayParameters:year - new instance's yearmonth - new instance's month as defined by Calendarday - new instance's day of monthReturns:CalendarDay set to the specified date
- frompublic static CalendarDay from(@Nullable java.util.Calendar calendar)Get a new instance set to the specified dayParameters:calendar - Calendar to pull date information from. Passing null will return nullReturns:CalendarDay set to the specified date
- frompublic static CalendarDay from(@Nullable java.util.Date date)Get a new instance set to the specified dayParameters:date - Date to pull date information from. Passing null will return null.Returns:CalendarDay set to the specified date
- getYearpublic int getYear()Get the yearReturns:the year for this day
- getMonthpublic int getMonth()Get the month, represented by values from CalendarReturns:the month of the year as defined by Calendar
- getDaypublic int getDay()Get the dayReturns:the day of the month for this day
- getDate@NonNull public java.util.Date getDate()Get this day as a DateReturns:a date with this days information
- getCalendar@NonNull public java.util.Calendar getCalendar()Get this day as a CalendarReturns:a new calendar instance with this day information
- copyTopublic void copyTo(@NonNull java.util.Calendar calendar)Copy this day's information to the given calendar instanceParameters:calendar - calendar to set date information to
- isInRangepublic boolean isInRange(@Nullable CalendarDay minDate, @Nullable CalendarDay maxDate)Determine if this day is within a specified rangeParameters:minDate - the earliest day, may be nullmaxDate - the latest day, may be nullReturns:true if the between (inclusive) the min and max dates.
- isBeforepublic boolean isBefore(@NonNull CalendarDay other)Determine if this day is before the given instanceParameters:other - the other day to testReturns:true if this is before other, false if equal or after
- isAfterpublic boolean isAfter(@NonNull CalendarDay other)Determine if this day is after the given instanceParameters:other - the other day to testReturns:true if this is after other, false if equal or before
- equalspublic boolean equals(java.lang.Object o)Overrides:equals in class java.lang.Object
- hashCodepublic int hashCode()Overrides:hashCode in class java.lang.Object
- toStringpublic java.lang.String toString()Overrides:toString in class java.lang.Object
- describeContentspublic int describeContents()Specified by:describeContents in interface android.os.Parcelable
- writeToParcelpublic void writeToParcel(android.os.Parcel dest, int flags)Specified by:writeToParcel in interface android.os.Parcelable
- Field Detail
댓글