Skip to content
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
futureWeekendBackgroundColor
headerColumnBackground
headerColumnPadding
headerColumnTextColor
headerRowBackgroundColor
headerRowPadding
horizontalFlingEnabled
hourHeight
hourSeparatorColor
hourSeparatorHeight
maxHourHeight
maxTime
minHourHeight
minTime
minOverlappingMinutes 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.
Clone this wiki locally