The Calendar view CalendarView can be used to display and select dates.
You can call the Setondatechangedlistener () method to bind the event listener.
Common XML attributes and related methods:
XML properties |
Related methods |
Description |
Android:datetextappearance |
setdatetextappearance (int) |
Set the date text of the Calendar view in the eyes |
Android:firstdayofweek |
Setfirstdayofweek (int) |
Set the first day of the week |
Android:focusedmonthdatecolor |
Setfocusedmonthdatecolor (int) |
Sets the color of the date of the month that gets focus |
Android:maxdate |
Setmaxdate (Long) |
Set the maximum supported date, specifying the maximum date in mm/dd/yyyy format |
Android:mindate |
Setmindate (Long) |
Sets the minimum supported date, specifying the minimum date in mm/dd/yyyy format |
Android:selecteddateverticalbar |
Setselecteddateverticalbar (int) |
Sets the drawable of the dashed line drawn on both sides of the selected date |
Android:selectedweekbackgroundcolor |
Setselectedweekbackgroundcolor (int) |
Sets the background color of the selected week |
Android:showweeknumber |
Setshowweeknumber (Boolean) |
Set whether to show the week |
Android:shownweekcount |
Setshownweekcount (int) |
Set the number of weeks to display |
Android:unfocusedmonthdatecolor |
Setunfocusedmonthdatecolor (int) |
Sets the color of the month date text without focus |
Android:weekdaytextappearance |
setweekdaytextappearance (int) |
Set a text style for the day of the week |
Android:weeknumbercolor |
Setweeknumbercolor (int) |
Set the color of the week number to display |
Android:weekseparatorlinecolor |
Setweekseparatorlinecolor (int) |
Set the color of the week separator line |
Android Learning Note (27): Calendar view Calendars