Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoobergs committed Feb 12, 2017
1 parent 8341365 commit 56aba4f
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 51 deletions.
45 changes: 29 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Still in beta, migrate.md is coming soon.
=================

Android Week View
=================

Expand Down Expand Up @@ -102,39 +100,55 @@ Customization
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.

- `allDayEventHeight`
- `autoLimitTime`
- `columnGap`
- `dayBackgroundColor`
- `dayNameLength`
- `eventCornerRadius`
- `eventMarginVertical`
- `eventPadding`
- `eventTextColor`
- `eventTextSize`
- `firstDayOfWeek`
- `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.
- `futureBackgroundColor`
- `futureWeekendBackgroundColor`
- `headerColumnBackground`
- `headerColumnPadding`
- `headerColumnTextColor`
- `headerRowBackgroundColor`
- `headerRowPadding`
- `horizontalFlingEnabled`
- `hourHeight`
- `hourSeparatorColor`
- `hourSeparatorHeight`
- `maxHourHeight`
- `maxTime`
- `minHourHeight`
- `minTime`
- `newEventColor`
- `newEventId`
- `newEventIconResource`
- `newEventLengthInMinutes`
- `newEventTimeResolutionInMinutes`
- `noOfVisibleDays`
- `nowLineColor`
- `nowLineThickness`
- `overlappingEventGap`
- `textSize`
- `todayBackgroundColor`
- `todayHeaderTextColor`
- `showDistinctPastFutureColor`
- `futureBackgroundColor`
- `pastBackgroundColor`
- `showDistinctWeekendColor`
- `futureWeekendBackgroundColor`
- `pastWeekendBackgroundColor`
- `showNowLine`
- `nowLineColor`
- `nowLineThickness`
- `scrollDuration`
- `showDistinctPastFutureColor`
- `showDistinctWeekendColor`
- `showFirstDayOfWeekFirst`
- `showHalfHours`
- `showNowLine`
- `textSize`
- `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.

Interfaces
----------
Expand All @@ -149,7 +163,7 @@ Use the following interfaces according to your need.
- `mWeekView.setEmptyViewLongPressListener()` to get a callback when any empty space is long pressed
- `mWeekView.setDateTimeInterpreter()` to set your own labels for the calendar header row and header column
- `mWeekView.setScrollListener()` to get an event every time the first visible day has changed

- `mWeekView.setAddEventClickListener()` to get the start and end time of an event to add
Sample
----------

Expand All @@ -159,7 +173,6 @@ To do
-------

* Add event touch feedback selector
* Show events that expand multiple days properly

Changelog
---------
Expand Down
71 changes: 36 additions & 35 deletions library/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="WeekView">
<attr name="allDayEventHeight" format="dimension"/>
<attr name="autoLimitTime" format="boolean"/>
<attr name="columnGap" format="dimension"/>
<attr name="dayBackgroundColor" format="color"/>
<attr name="dayNameLength" format="enum">
<enum name="length_short" value="1"/>
<enum name="length_long" value="2"/>
</attr>
<attr name="eventCornerRadius" format="dimension"/>
<attr name="eventMarginVertical" format="dimension"/>
<attr name="eventPadding" format="dimension"/>
<attr name="eventTextColor" format="color"/>
<attr name="eventTextSize" format="dimension"/>
<attr name="firstDayOfWeek" format="enum">
<enum name="sunday" value="1"/>
<enum name="monday" value="2"/>
Expand All @@ -10,57 +23,45 @@
<enum name="friday" value="6"/>
<enum name="saturday" value="7"/>
</attr>
<attr name="hourHeight" format="dimension"/>
<attr name="minHourHeight" format="dimension"/>
<attr name="maxHourHeight" format="dimension"/>
<attr name="textSize" format="dimension"/>
<attr name="eventTextSize" format="dimension"/>
<attr name="futureBackgroundColor" format="color"/>
<attr name="futureWeekendBackgroundColor" format="color"/>
<attr name="headerColumnBackground" format="color"/>
<attr name="headerColumnPadding" format="dimension"/>
<attr name="headerRowPadding" format="dimension"/>
<attr name="columnGap" format="dimension"/>
<attr name="headerColumnTextColor" format="color"/>
<attr name="noOfVisibleDays" format="integer"/>
<attr name="showFirstDayOfWeekFirst" format="boolean"/>
<attr name="headerRowBackgroundColor" format="color"/>
<attr name="dayBackgroundColor" format="color"/>
<attr name="headerRowPadding" format="dimension"/>
<attr name="horizontalFlingEnabled" format="boolean"/>
<attr name="hourHeight" format="dimension"/>
<attr name="hourSeparatorColor" format="color"/>
<attr name="todayBackgroundColor" format="color"/>
<attr name="todayHeaderTextColor" format="color"/>
<attr name="hourSeparatorHeight" format="dimension"/>
<attr name="eventTextColor" format="color"/>
<attr name="maxHourHeight" format="dimension"/>
<attr name="maxTime" format="integer"/>
<attr name="minHourHeight" format="dimension"/>
<attr name="minTime" format="integer"/>
<attr name="newEventColor" format="color"/>
<attr name="newEventId" format="integer"/>
<attr name="newEventIconResource" format="integer"/>
<attr name="newEventLengthInMinutes" format="integer"/>
<attr name="newEventTimeResolutionInMinutes" format="integer"/>
<attr name="eventPadding" format="dimension"/>
<attr name="headerColumnBackground" format="color"/>
<attr name="dayNameLength" format="enum">
<enum name="length_short" value="1"/>
<enum name="length_long" value="2"/>
</attr>
<attr name="noOfVisibleDays" format="integer"/>
<attr name="nowLineColor" format="color"/>
<attr name="nowLineThickness" format="dimension"/>
<attr name="overlappingEventGap" format="dimension"/>
<attr name="eventMarginVertical" format="dimension"/>
<attr name="xScrollingSpeed" format="float"/>
<attr name="eventCornerRadius" format="dimension"/>
<attr name="showDistinctPastFutureColor" format="boolean"/>
<attr name="showDistinctWeekendColor" format="boolean"/>
<attr name="futureBackgroundColor" format="color"/>
<attr name="pastBackgroundColor" format="color"/>
<attr name="futureWeekendBackgroundColor" format="color"/>
<attr name="pastWeekendBackgroundColor" format="color"/>
<attr name="scrollDuration" format="integer"/>
<attr name="showDistinctPastFutureColor" format="boolean"/>
<attr name="showDistinctWeekendColor" format="boolean"/>
<attr name="showFirstDayOfWeekFirst" format="boolean"/>
<attr name="showHalfHours" format="boolean" />
<attr name="showNowLine" format="boolean"/>
<attr name="nowLineColor" format="color"/>
<attr name="nowLineThickness" format="dimension"/>
<attr name="horizontalFlingEnabled" format="boolean"/>
<attr name="textSize" format="dimension"/>
<attr name="todayBackgroundColor" format="color"/>
<attr name="todayHeaderTextColor" format="color"/>
<attr name="verticalFlingEnabled" format="boolean"/>
<attr name="allDayEventHeight" format="dimension"/>
<attr name="xScrollingSpeed" format="float"/>
<attr name="zoomFocusPoint" format="fraction"/>
<attr name="zoomFocusPointEnabled" format="boolean"/>
<attr name="scrollDuration" format="integer"/>
<attr name="showHalfHours" format="boolean" />
<attr name="autoLimitTime" format="boolean"/>
<attr name="minTime" format="integer"/>
<attr name="maxTime" format="integer"/>

</declare-styleable>
</resources>

0 comments on commit 56aba4f

Please sign in to comment.