You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. Implement `WeekView.MonthChangeListener`, `WeekView.EventClickListener`, `WeekView.EventLongPressListener` according to your need.
90
-
91
-
5. Provide the events for the `WeekView` in `WeekView.MonthChangeListener.onMonthChange()` callback. Please remember that the calendar pre-loads events of three consecutive months to enable lag-free scrolling.
92
-
93
-
```java
94
-
MonthLoader.MonthChangeListener mMonthChangeListener = new MonthLoader.MonthChangeListener() {
95
-
@Override
96
-
public List<WeekViewEvent> onMonthChange(int newYear, int newMonth) {
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.
108
-
109
-
- `allDayEventHeight`
110
-
- `autoLimitTime`
111
-
- `columnGap`
112
-
- `dayBackgroundColor`
113
-
- `dayNameLength`
114
-
- `dropListenerEnabled`: Whether items can be dropped on the weekview
115
-
- `eventCornerRadius`
116
-
- `eventMarginVertical`
117
-
- `eventPadding`
118
-
- `eventTextColor`
119
-
- `eventTextSize`
120
-
- `firstDayOfWeek`
121
-
- `futureBackgroundColor`
122
-
- `futureWeekendBackgroundColor`
123
-
- `headerColumnBackground`
124
-
- `headerColumnPadding`
125
-
- `headerColumnTextColor`
126
-
- `headerRowBackgroundColor`
127
-
- `headerRowPadding`
128
-
- `horizontalFlingEnabled`
129
-
- `hourHeight`
130
-
- `hourSeparatorColor`
131
-
- `hourSeparatorHeight`
132
-
- `maxHourHeight`
133
-
- `maxTime`
134
-
- `minHourHeight`
135
-
- `minTime`
136
-
- `minOverlappingMinutes`: The minimal amount of overlap of 2 events needed to be seen as overlapping events
137
-
- `newEventColor`
138
-
- `newEventId`
139
-
- `newEventIconResource`
140
-
- `newEventLengthInMinutes`
141
-
- `newEventTimeResolutionInMinutes`
142
-
- `noOfVisibleDays`
143
-
- `nowLineColor`
144
-
- `nowLineThickness`
145
-
- `overlappingEventGap`
146
-
- `pastBackgroundColor`
147
-
- `pastWeekendBackgroundColor`
148
-
- `scrollDuration`
149
-
- `showDistinctPastFutureColor`
150
-
- `showDistinctWeekendColor`
151
-
- `showFirstDayOfWeekFirst`
152
-
- `showNowLine`
153
-
- `textSize`
154
-
- `timeColumnResolution`
155
-
- `todayBackgroundColor`
156
-
- `todayHeaderTextColor`
157
-
- `verticalFlingEnabled`
158
-
- `xScrollingSpeed`
159
-
- `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.
160
-
- `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.
161
-
162
-
Interfaces
163
-
----------
164
-
165
-
Use the following interfaces according to your need.
34
+
Getting Started
35
+
---------------
166
36
167
-
- `mWeekView.setWeekViewLoader()` to provide events to the calendar
168
-
- `mWeekView.setMonthChangeListener()` to provide events to the calendar by months
169
-
- `mWeekView.setOnEventClickListener()` to get a callback when an event is clicked
170
-
- `mWeekView.setEventLongPressListener()` to get a callback when an event is long pressed
171
-
- `mWeekView.setEmptyViewClickListener()` to get a callback when any empty space is clicked
172
-
- `mWeekView.setEmptyViewLongPressListener()` to get a callback when any empty space is long pressed
173
-
- `mWeekView.setDateTimeInterpreter()` to set your own labels for the calendar header row and header column
174
-
- `mWeekView.setScrollListener()` to get an event every time the first visible day has changed
175
-
- `mWeekView.setAddEventClickListener()` to get the start and end time of an event to add
176
-
- `mWeekView.setTextColorPicker()` to change the textcolor of an event, based on the event. You can, for example, set a different text color depending on the color of the event.
177
-
- `mWeekView.setDropListener()` to get a callback when a view is dropped at a certain date.
37
+
View the [wiki](https://github.com/Quivr/Android-Week-View/wiki)
178
38
179
39
Sample
180
40
----------
181
41
182
42
There is also a [sample app](https://github.com/quivr/Android-Week-View/tree/master/sample) to get you started.
183
43
184
-
To do
185
-
-------
186
-
187
-
* Add event touch feedback selector
188
-
189
-
Changelog
190
-
---------
191
-
**Version 2.2.2**
192
-
* Added `DropListener` and `dropListenerEnabled`
193
-
* Added `TextColorPicker`
194
-
* Fixed some problems with placement of add event rectangle
195
-
* Added `minOverlappingMinutes`
196
-
197
-
**Version 2.2.1**
198
-
* Small fix on string equality
199
-
200
-
**Version 2.2.0**
201
-
* IMPORTANT: Prefetching isn't done by the library anymore (see [#42](/../../pull/42))
202
-
* Strings can now be used as Id's of WeekViewEvents
203
-
204
-
**Version 2.0.0**
205
-
* This fork is first released
206
-
* Possibility to set minDate and maxDate
207
-
* Allday events are supported
208
-
* Events can be add by clicking on empty space
209
-
210
-
**Version 1.2.6**
211
-
212
-
* Add empty view click listener
213
-
* Fix padding bug
214
-
* Fix bug when setting colors of different components
215
-
* Add ability to turn off fling gesture
216
-
* Add example of how to load events asynchronously in the sample app
217
-
218
-
**Version 1.2.5**
219
-
220
-
* Add support for using subclasses of `WeekViewEvent`
221
-
* Fix scroll animation
222
-
* Add support for semi-transparent header colors
223
-
224
-
**Version 1.2.4**
225
-
226
-
* **NOTE:** If you are using `WeekView.MonthChangeListener`, make sure to change it into `MonthLoader.MonthChangeListener`
227
-
* Add support to have loaders other than MonthViewLoader
228
-
* Add pinch to zoom support
229
-
* Add support for location
230
-
* Add ability to have different colors for past, future, weekend days
231
-
* Add support for "now" line
232
-
233
-
**Version 1.2.3**
234
-
235
-
* Get callbacks when scrolling horizontally
236
-
* `goToHour` and `goToDate` methods has been fixed
237
-
* Use `getFirstVisibleHour` method to get the first visible hour in the week view
238
-
239
-
**Version 1.2.1**
240
-
241
-
* Better scrolling added
242
-
* Get callbacks when empty view is tapped/long pressed
243
-
* Control the speed of scrolling
244
-
* Support for multiple language added
245
-
* Ability to set your own interpreter for header row and column added
246
-
247
-
**Version 1.1.7**
248
-
249
-
* You can now dynamically scroll to an hour of your preference.
250
-
251
-
**Version 1.1.6**
252
-
253
-
* Added support for events that expands to multiple days
254
-
255
-
**Version 1.1.5**
256
-
257
-
* A bug related to overlapping events fixed
258
-
* You can now programmatically get first and last visible day in the week view
0 commit comments