forked from alamkanak/Android-Week-View
-
Notifications
You must be signed in to change notification settings - Fork 65
Customization
Jesse Hoobergs edited this page Feb 9, 2018
·
7 revisions
You can customize the look of the WeekView
in xml.
- Use the following attributes in xml.
- All these attributes also have getters and setters to enable you to change the style dynamically.
Attribute | Default Value | Description |
---|---|---|
allDayEventHeight |
100 | The height of all day events. |
autoLimitTime |
false | If set to true, the range of visible hours is automatically set to the smallest range in which all events take place. If there are for example only events between 10u and 18u, only the hours 10 until 18 are visible. |
columnGap |
10 | The gap between days |
dayBackgroundColor |
#F5F5F5 | The backgroundcolor of a day |
dropListenerEnabled |
false | Whether items can be dropped on the weekview |
eventCornerRadius |
0 | The radius of the corners of the event rectangles |
eventMarginVertical |
0 | Set the top and bottom margin of the event. The event will keep this margin from the top and bottom edge. This margin is useful for differentiating consecutive events |
eventPadding |
8 | The padding inside the event |
eventTextColor |
#000000 | The text color of events |
eventTextSize |
12 | the text size on events |
firstDayOfWeek |
Monday | Set the first day of the week. First day of the week is used only when the week view is first drawn. It does not of any effect after user starts scrolling horizontally. Note: This method will only work if the week view is set to display more than 6 days at once. |
futureBackgroundColor |
#F5F5F5 | The backgroundcolor of the future |
futureWeekendBackgroundColor |
#000000 | The backgroundcolor of future weekend days |
headerColumnBackground |
#FFFFFF | Background color of header column (left bar with hours) |
headerColumnPadding |
10 | Padding of header coluln |
headerColumnTextColor |
#000000 | Text color of header column |
headerRowBackgroundColor |
#FFFFFF | Background color of header row (top bar with dates) |
headerRowPadding |
10 | Padding of header row |
horizontalFlingEnabled |
true | Whether the week view should fling horizontally |
hourHeight |
50 | The default height of an hour (can be used for zooming etc) |
hourSeparatorColor |
#E6E6E6 | Color of the hourlines |
hourSeparatorHeight |
2 | Height of the hourlines |
maxHourHeight |
250 | The max height of an hour. Can be seen as max zoom level |
maxTime |
24 | The heighest hour that is shown in the view |
minHourHeight |
0 | The minimal height of an hour. Can be seen as min zoom level |
minTime |
0 | The lowest hour that is shown in the view |
minOverlappingMinutes |
0 | The minimal amount of overlap of 2 events needed to be seen as overlapping events |
newEventColor |
||
newEventId |
||
newEventIconResource |
||
newEventLengthInMinutes |
||
newEventTimeResolutionInMinutes |
||
noOfVisibleDays |
||
nowLineColor |
||
nowLineThickness |
||
overlappingEventGap |
||
pastBackgroundColor |
||
pastWeekendBackgroundColor |
||
scrollDuration |
||
showDistinctPastFutureColor |
||
showDistinctWeekendColor |
||
showFirstDayOfWeekFirst |
||
showNowLine |
||
textSize |
||
timeColumnResolution |
||
todayBackgroundColor |
||
todayHeaderTextColor |
||
verticalFlingEnabled |
||
xScrollingSpeed |
||
zoomFocusPoint |
The focused point (percentage of the view height) where the week view is zoomed around. This point will not move while zooming. You can declare it as a fraction app:focusPoint="30%" and if is not declared the top of the view is used. |
|
zoomFocusPointEnabled |
If you set this to false the zoomFocusPoint won't take effect any more while zooming. The zoom will always be focused at the center of your gesture. |