Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hour separator as dash-line #286

Closed
wants to merge 505 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
505 commits
Select commit Hold shift + click to select a range
5b45496
Allow resource IDs for setting colors in WeekViewEvent.Style
thellmund Jun 3, 2019
3385c85
Make minor naming tweaks
thellmund Jun 3, 2019
cd8db16
Allow resource IDs for title and location of an event
thellmund Jun 4, 2019
c4460fc
Add initial implementation of extension libraries
thellmund Jun 4, 2019
7307a46
Add Android Maven plugin to extension modules
thellmund Jun 6, 2019
bfd2997
Add extension methods for start and end time to WeekViewEvent.Builder
thellmund Jun 8, 2019
1ec4d7d
Fix issue where size of one WeekView affected size of other WeekViews
thellmund Jun 16, 2019
19121bb
Make minor tweaks to sample app
thellmund Jun 16, 2019
f810dad
Fix issue where all-day events weren't shown if there were many of them
thellmund Jun 16, 2019
4fd877e
Fix issue where events cache wasn't cleared after calling notifyDataS…
thellmund Jun 23, 2019
e77a4be
Update to API 29
thellmund Jun 24, 2019
5b4ef30
Update module names and build.gradle files
thellmund Jun 24, 2019
3be7d43
Make update easier with @Deprecated and replace-with infos
thellmund Jul 4, 2019
c122f05
Add extension methods for more methods that use Calendar
thellmund Jul 5, 2019
b90e092
Add WeekViewAdapter for JodaTime, JSR310, ThreeTenABP
thellmund Jul 7, 2019
8ef2315
Make various smaller code tweaks
thellmund Jul 8, 2019
9f7d11d
Fix issue where day label cache wasn't cleared when number of days ch…
thellmund Jul 8, 2019
350e9f6
Move header height calculation to HeaderRowCalculator
thellmund Jul 8, 2019
1b17d73
Move all-day event chip calculation to EventsCalculator
thellmund Jul 8, 2019
8f59168
Move calculator objects out of drawer objects
thellmund Jul 8, 2019
90633c8
Separate calculations and drawing actions from each other in onDraw()
thellmund Jul 8, 2019
2d4a8c5
Merge MegaCache into EventCache
thellmund Jul 8, 2019
b804010
Adapt caching classes, fix multi-line header issues
thellmund Jul 8, 2019
fb8c10b
Tweak cache clearing, fix issue that prevented restoring of first vis…
thellmund Jul 8, 2019
ff1aa97
Fix navigation issues in StaticActivity
thellmund Jul 8, 2019
4d2cecf
Only update all-day events and header row if necessary
thellmund Jul 8, 2019
221712e
Simplify onDraw() method
thellmund Jul 8, 2019
847318a
Fix issues in extensions methods
thellmund Jul 8, 2019
a4dc201
Update ScrollListener, add OnRangeChangeListener, make minor code tweaks
thellmund Jul 10, 2019
9e9cb2a
Update README.md
thellmund Jul 10, 2019
8b19075
Merge branch 'develop' of https://github.com/thellmund/Android-Week-V…
thellmund Jul 10, 2019
6acc5d5
Fix issue in async activity in sample
thellmund Jul 10, 2019
acdef45
Fix issue where WeekView would freeze if event height was 0px
thellmund Jul 16, 2019
2307695
Fix wrong text alignment of day labels when using multi-line on API 21
thellmund Jul 16, 2019
874aa17
Encapsulate text layout creation in TextLayoutBuilder
thellmund Jul 16, 2019
d29a0b6
Fix issue where click listeners would match click to wrong event
thellmund Jul 16, 2019
18eb198
Remove log statements
thellmund Jul 16, 2019
39df7df
Remove commented code
thellmund Jul 16, 2019
a59d905
Draw now line over entire day width
thellmund Jul 16, 2019
57a3bda
Tweak calculation of all-day event chip height, update documentation
thellmund Jul 16, 2019
bea64f9
Address some lint issues
thellmund Jul 16, 2019
6b44444
Tweak code in sample
thellmund Jul 16, 2019
d999c91
Tweak how firstVisibleDay is calculated
thellmund Jul 17, 2019
ec65bdd
Rename first/last visible date properties
thellmund Jul 17, 2019
38b5217
Update to Kotlin 1.3.41
thellmund Jul 17, 2019
bafcbc8
Update JodaTime dependency
thellmund Jul 17, 2019
f14a1ce
Improve dependency management via Gradle Extra Properties
thellmund Jul 17, 2019
3fe26cb
Update README.md
thellmund Jul 17, 2019
9a689e6
Address issue where WeekView froze when zooming
thellmund Jul 18, 2019
02ed9e2
Fix issue when calculating difference between date and today
thellmund Jul 19, 2019
53243fa
Fix issue where duplicate events would appear in EventCache
thellmund Jul 19, 2019
67992bc
Add Activity with Fragment to sample app
thellmund Jul 19, 2019
9ffaecc
Fix issue where some events wouldn't span the entire width available …
thellmund Jul 20, 2019
f0155f6
Extract dedicated EventChip cache from EventCache
thellmund Jul 21, 2019
822b225
Add ktlint to project
thellmund Jul 21, 2019
1fb0925
Add CircleCI config file
thellmund Jul 21, 2019
7657b99
Ignore lint issues in sample app
thellmund Jul 21, 2019
39cc997
Update issue templates
thellmund Jul 21, 2019
15e2510
Update issue templates
thellmund Jul 21, 2019
ed821b7
Update pull_request_template.md
thellmund Jul 21, 2019
a8d18ca
Make minor code tweaks
thellmund Jul 21, 2019
3a01c42
Add tests for WeekViewEvent
thellmund Jul 21, 2019
521aed8
Make minor code tweaks
thellmund Jul 22, 2019
2db925a
Fix issue where background grid and now line were drawn incorrectly i…
thellmund Jul 22, 2019
dc3aa34
Draw event chip with anti-aliasing for smoother corners
thellmund Jul 22, 2019
317ece3
Fix wrong time in onEmptyViewClick
thellmund Jul 23, 2019
70da0b1
Fix missing IDs when loading fake events from events.json
thellmund Jul 23, 2019
1204bad
Fix issue where all-day events wouldn't appear
thellmund Jul 23, 2019
cc26be4
Fix issue where both OnEventLongPressListener and OnEmptyViewLongPres…
thellmund Jul 24, 2019
9ff7c4e
Update interface names and corresponding methods on WeekView
thellmund Jul 24, 2019
66f3ad6
Display location underneath title (#94)
thellmund Jul 25, 2019
83f61e4
Add option to use dimension resource for border width of an EventChip…
thellmund Jul 25, 2019
12e144a
Tweak adaptive text size behavior
thellmund Jul 25, 2019
5eab7da
Fix rendering issue that occurred when adaptive text size was not ena…
thellmund Jul 26, 2019
c62eb34
Deprecate empty WeekViewEvent.Builder constructor to encourage passin…
thellmund Jul 27, 2019
609f526
Add sanity tests for DateExtensions in extension libraries
thellmund Jul 27, 2019
3deb57a
Make minor code adjustments
thellmund Jul 29, 2019
62fbd94
Update ktlint (#98)
thellmund Jul 29, 2019
3cf0f33
Replace eventPadding with eventPaddingHorizontal and eventPaddingVert…
thellmund Jul 29, 2019
c79ec52
Fix issue where header background color would not be set correctly
thellmund Jul 29, 2019
07fce6c
Make minor tweaks in sample app
thellmund Jul 30, 2019
07c6e33
Fix issue where calling goToDate() didn't work as expected
thellmund Jul 30, 2019
c78395b
Add anti-aliasing for now dot
thellmund Jul 31, 2019
0bca7d2
Fix issue where WeekView would freeze when fitting text into small chips
thellmund Aug 1, 2019
1ad7ff5
Tweak how vertical event padding is applied
thellmund Aug 1, 2019
a7d0f21
Fix issue where event chip corners were drawn incorrectly
thellmund Aug 3, 2019
c068ce3
Remove redundant Canvas operations
thellmund Aug 11, 2019
58815c5
Fix issue where all-day events and day labels were drawn incorrectly
thellmund Aug 12, 2019
e1ab511
Fix issue where newline characters in title and location would lead t…
thellmund Aug 15, 2019
46eb674
Simplify events fetching (#102)
thellmund Aug 26, 2019
4e0b615
Fix issue that occurred when navigating to specific date
thellmund Aug 30, 2019
45aa83b
Address issue in WeekView.submit()
thellmund Sep 5, 2019
5fcf97e
Refactor loading and caching for simple and paged loading
thellmund Sep 5, 2019
d9a0e6d
Prevent zooming out further than desired hours per day
thellmund Sep 5, 2019
a673573
Fix thread issue in EventsDiffer
thellmund Sep 5, 2019
0b77fdd
Simplify EventsLoader
thellmund Sep 5, 2019
ed70703
Update Kotlin version and Android Gradle plugin
thellmund Sep 6, 2019
d251d4d
Update sample app
thellmund Sep 6, 2019
a972cd6
Make minor code improvements
thellmund Sep 6, 2019
b314ede
Fix issue where clicks on all-day events weren't handled
thellmund Sep 7, 2019
24efdd9
Use ConcurrentHashMap to prevent ConcurrentModificationException
thellmund Sep 7, 2019
1ae9bff
Add EventsLoaderTest
thellmund Sep 10, 2019
1063329
Update event times in EventsDatabase for easier testing
thellmund Sep 10, 2019
fb58461
Make minor code tweaks
thellmund Sep 29, 2019
3078416
Update README.md
thellmund Sep 29, 2019
beade6d
Update README.md
thellmund Sep 29, 2019
4b2f574
Update CHANGELOG.md
thellmund Sep 29, 2019
8ccab92
Update CHANGELOG.md
thellmund Sep 29, 2019
561a55c
Update CHANGELOG.md
thellmund Sep 29, 2019
cd8ead0
Fix issue where chips would sometimes disappear when scrolling
thellmund Oct 30, 2019
21e8ada
Fix issue where calendar would stay empty when going to a specific date
thellmund Oct 30, 2019
c86a527
Fix issue where multi-day all-day events weren't displayed correctly
thellmund Oct 31, 2019
8956316
Tweak EventsDatabase in sample app to prevent UI inconsistencies
thellmund Nov 1, 2019
246f96d
Tweak code in EventsDatabase
thellmund Nov 1, 2019
91b26f4
Update CHANGELOG.md
thellmund Nov 1, 2019
ff3d62d
Make various smaller code improvements
thellmund Nov 20, 2019
0636942
Merge branch 'develop' of https://github.com/thellmund/Android-Week-V…
thellmund Nov 20, 2019
0a079f8
Add emoji support (#126)
thellmund Nov 23, 2019
0084ca0
Add accessibility support (#127)
thellmund Nov 23, 2019
e99820f
Update CHANGELOG.md
thellmund Dec 10, 2019
64e1a28
Fix issue where WeekView would crash if submit() was called before Dr…
thellmund Dec 10, 2019
487e9e3
Remove deprecated methods and typealiases
thellmund Dec 12, 2019
8fd8670
Prevent exception caused by uninitialized EmojiCompat
thellmund Jan 13, 2020
ab866ff
Fix broken tests in DefaultDateTimeInterpreterTest
thellmund Jan 13, 2020
bf4f4f1
Update CHANGELOG.md
thellmund Jan 13, 2020
fa6ae3e
Fix issue where now line wasn't drawn if now line dot was disabled
thellmund Jan 13, 2020
8bf20a3
Fix issue where time column background color wasn't updated correctly
thellmund Jan 13, 2020
267c102
Fix issues with firstDayOfWeek when week starts on Monday
thellmund Jan 16, 2020
4b73c2c
Update CHANGELOG.md
thellmund Jan 19, 2020
9cf33e5
Fix issue where click listeners didn't work after zooming
thellmund Jan 31, 2020
85445c9
Update CHANGELOG.md
thellmund Jan 31, 2020
3b9ea95
Simplify internal date manipulation
thellmund Jan 31, 2020
0561d66
Fix issue where goToHour() would work incorrectly when minHour was set
thellmund Feb 6, 2020
a3530ba
Update CHANGELOG.md
thellmund Feb 7, 2020
6388e50
Fix issue where WeekView would crash when submitting new events
thellmund Feb 9, 2020
79f1462
Update CHANGELOG.md
thellmund Feb 9, 2020
39ab117
fix computation of endDate for events that span multiple days (#139)
Eyedev42 Mar 23, 2020
2af14b5
Fix crash issue: TypeCastException when construct SaveState (#144)
shuirna May 10, 2020
7770df7
Add better scrolling (#145)
thellmund May 12, 2020
adba493
Add week number feature (#146)
thellmund May 12, 2020
bdc4b33
Add option for header row bottom shadow and tweak now line dot behavi…
thellmund May 12, 2020
95219af
Mark various scrolling attributes as deprecated (#148)
thellmund May 12, 2020
5b3edba
Replace DateTimeInterpreter with lambdas (#149)
thellmund May 12, 2020
f6ca193
Move EventChipsExpander code into EventChipsLoader
thellmund May 14, 2020
808906d
Combine date label handling for single-line and multi-line (#151)
thellmund May 16, 2020
53d8889
Allow SpannableString for event titles and locations (#152)
thellmund May 17, 2020
0686321
Update dependencies
thellmund Jul 2, 2020
fde5fb7
Deprecate OnMonthChangeListener
thellmund Jul 3, 2020
06a6815
Fix issue where day background was drawn incorrectly if minHour was set
thellmund Jul 15, 2020
7358349
Consolidate all view state information in new ViewState data class (#…
thellmund Aug 9, 2020
c02aa12
Use SimpleAdapter and PagingAdapter for submitting new events (#162)
thellmund Aug 9, 2020
025d15a
Use Renderers for update and drawing operations (#163)
thellmund Aug 9, 2020
11ef51b
Simplify EventsCaches and change behavior of PagedEventsCache
thellmund Aug 9, 2020
5badc36
Improve how borders are drawn for multi-day events
thellmund Aug 9, 2020
a76b70f
Make minor code improvements
thellmund Aug 10, 2020
5d421b4
Fix issue where header height wasn't updated correctly
thellmund Aug 10, 2020
c8b1c3f
Update compile and target SDK to 30
thellmund Aug 14, 2020
8aab616
Don't default to strike-through for events in sample app
thellmund Aug 21, 2020
8f9bc9c
Make various improvement throughout the codebase
thellmund Aug 25, 2020
0013111
Fix for concurrency bug (#160)
FeFelten Aug 31, 2020
ebd7069
Remove firstDayOfWeek attribute
thellmund Aug 28, 2020
9d78437
Extract ViewState creation into ViewStateFactory
thellmund Aug 30, 2020
6a43afa
Fix App Not Responding when trying to fit multi-line text (#165)
thellmund Sep 19, 2020
0666c00
Make minor code tweaks
thellmund Sep 21, 2020
cd7df69
Add extension-specific adapters
thellmund Sep 28, 2020
5a82241
Streamline API
thellmund Sep 28, 2020
55beebc
Remove core library desugaring until it's really being used
thellmund Sep 28, 2020
9918dc3
Remove commented code
thellmund Sep 28, 2020
36b0ee7
Bump version to 5.0.0 and update changelog
thellmund Sep 28, 2020
d0a7752
Fix crash in sample app
thellmund Sep 29, 2020
e5eb0a0
Re-render immediately when header height changed
thellmund Sep 29, 2020
bd60369
Fix issue where submitting an empty list wouldn't clear WeekView (#173)
thellmund Sep 30, 2020
e2d8eba
Fix issue where minDate and maxDate didn't work as expected (#174)
thellmund Sep 30, 2020
1795a3a
Add weekendTextColor attribute to set color of weekend dates (#176)
thellmund Sep 30, 2020
e8c392d
Update changelog
thellmund Sep 30, 2020
d156139
Animate header height changes (#177)
thellmund Sep 30, 2020
41184d4
Show all-day events with full day width (#178)
thellmund Oct 1, 2020
0da7e9b
Update changelog
thellmund Oct 1, 2020
4b64ee0
Introduce right-to-left support (#168)
thellmund Oct 2, 2020
8fd7930
Update changelog
thellmund Oct 2, 2020
c224706
Fix issue where time column separator was drawn slighty off its inten…
thellmund Oct 3, 2020
4ed47e7
Update CircleCI config (#181)
thellmund Oct 6, 2020
db63425
Fix issue where chips of removed events continued to be rendered (#185)
thellmund Oct 18, 2020
5da129b
Update changelog
thellmund Oct 20, 2020
dccb6e2
Keep a single EventChipsCache in the adapter
thellmund Oct 30, 2020
12b911c
Prevent event chips that can't fit any text from disappearing
thellmund Nov 2, 2020
f9c8422
Fix issue where multi-day events weren't drawn until the bottom of th…
thellmund Nov 2, 2020
3bd7b77
Improve handling of events with different time zones (#194)
thellmund Nov 3, 2020
3d1cbb6
Update changelog
thellmund Nov 3, 2020
970de52
Fix issue where very short events weren't rendered correctly
thellmund Nov 7, 2020
8efccd2
Fix issue where goToCurrentTime() didn't work correctly
thellmund Nov 9, 2020
f5efe2a
Adjust provided hour in goToHour() instead of throwing exception
thellmund Nov 10, 2020
7f203ac
Update changelog
thellmund Nov 10, 2020
4130055
Fix issue where `goToCurrentTime()` was ignored if WeekView was scrol…
thellmund Nov 10, 2020
c042abc
Update changelog
thellmund Nov 10, 2020
2fa6202
Streamline API for scrolling to dates and times (#198)
thellmund Nov 10, 2020
6f08dab
Add support for showing blocked times (#180)
thellmund Nov 10, 2020
29cd33e
Fix issue where onEmptyViewLongClick() was not called correctly
thellmund Nov 15, 2020
a81c4e2
Make minor tweaks to sample app
thellmund Nov 15, 2020
3f0c8ab
Make sure bounds for time column drawing are set correctly
thellmund Nov 18, 2020
750063e
Extract Emoji processing into separate module (#204)
thellmund Nov 19, 2020
dd70002
Update changelog
thellmund Nov 19, 2020
1083f71
Apply Android Maven plugin in build.gradle file of base module
thellmund Nov 25, 2020
e8954a7
Update changelog
thellmund Nov 25, 2020
cb4e032
Improve logic for returning the first visible hour (#213)
thellmund Dec 20, 2020
e4efc28
Fix bugs around scrolling and behavior of onRangeChanged() (#215)
thellmund Dec 30, 2020
801a53c
Fix layout issue when used in ViewPager (#216)
thellmund Dec 30, 2020
54d5f3a
Fix crash in sample app
thellmund Dec 30, 2020
4e60427
Fix crash in sample app
thellmund Dec 30, 2020
eac789a
Update change log
thellmund Dec 30, 2020
6708edf
Make small tweaks to sample app
thellmund Dec 30, 2020
916ed68
Fix issue where EventsDatabase would return events for wrong date range
thellmund Jan 16, 2021
37009b8
Initialize ViewState.dateRange on construction (#224)
RemiNV Jan 16, 2021
f80b6f8
Initialize emoji processing automatically on app startup
thellmund Jan 20, 2021
77b8427
Fix issue where onRangeChanged wasn't called on API 25 and below (#229)
thellmund Jan 30, 2021
b305562
Add missing onFinished() call back into Navigator#scrollHorizontallyTo
thellmund Feb 6, 2021
72d633e
Update changelog
thellmund Feb 6, 2021
ebbe57e
Use core library desugaring in JSR310 module (#231)
thellmund Feb 14, 2021
9f9f938
Update changelog
thellmund Feb 14, 2021
fd99411
Fix issue where day backgrounds weren't applied correctly (#234)
thellmund Mar 3, 2021
fea7369
Upgrade deprecation level for some deprecated properties
thellmund Mar 3, 2021
9eb150e
Update changelog
thellmund Mar 3, 2021
22910a9
Fix issues where certain time ranges caused crashes (#240)
thellmund Mar 12, 2021
8abc0c6
Shorten events that are outside the min-max hour range (#235)
thellmund Mar 12, 2021
e719567
Fix issue where text fitting would completely remove subtitle (#241)
thellmund Mar 12, 2021
852cc51
Streamline sample app
thellmund Apr 3, 2021
9284312
Fix issue where event bottom wasn't drawn correctly
thellmund Apr 4, 2021
9a64be5
Update dependencies
thellmund Apr 4, 2021
06ec85e
Fix issue where deleting events didn't work (#249)
thellmund May 4, 2021
4e152f4
Fix various minor issues
thellmund May 8, 2021
907b267
Extend time column separator into header
thellmund May 8, 2021
e15ac4c
Add adapter callbacks for vertical scrolling (#245)
thellmund May 9, 2021
08dbfe7
Fix header height calculation for single-day view
thellmund May 15, 2021
a0abe04
Drag and drop (#250)
thellmund May 29, 2021
0ae762a
Make sure WeekView in WithFragmentActivity doesn't stay empty
thellmund Jun 8, 2021
f04d0e2
Fix issue where WeekView didn't scroll correctly until maxDate
thellmund Jun 9, 2021
f0b4d1f
Fix issue that prevented zooming from working
thellmund Jun 12, 2021
cf7afc1
Use colorBackground instead of windowBackground as default background…
thellmund Jun 13, 2021
d4acc04
Update changelog
thellmund Jun 13, 2021
4d889cb
Fix issue where WeekView crashed when zooming very short events
thellmund Jun 14, 2021
3d0080e
Update changelog
thellmund Jun 14, 2021
dde61fd
Fix scrolling issue in RTL mode (#257)
thellmund Jun 20, 2021
bc9cfa9
Stick to actual week when in week view (#246)
thellmund Jun 20, 2021
823f123
Fix another issue with RTL scrolling
thellmund Jun 26, 2021
8983650
Remove deprecated properties
thellmund Sep 12, 2021
706ef3c
Make onCreateEntity abstract instead of open
thellmund Dec 30, 2021
12d2a87
Update dependencies (#283)
thellmund May 18, 2022
7abd68f
Remove Duration interface (#284)
thellmund May 18, 2022
95fdc11
Support hour separator as dash-line
porum Jun 10, 2022
50efe41
Support header corner radius
porum Jun 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-30
auth:
username: tillhellmund
password: $DOCKER_PASSWORD
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}
-{{ checksum "core/build.gradle" }}
-{{ checksum "jodatime/build.gradle" }}
-{{ checksum "jsr310/build.gradle" }}
-{{ checksum "sample/build.gradle" }}
-{{ checksum "threetenabp/build.gradle" }}
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}
-{{ checksum "core/build.gradle" }}
-{{ checksum "jodatime/build.gradle" }}
-{{ checksum "jsr310/build.gradle" }}
-{{ checksum "sample/build.gradle" }}
-{{ checksum "threetenabp/build.gradle" }}
- run:
name: Run ktlintCheck
command: ./gradlew --continue ktlintCheck
- run:
name: Run Tests
command: ./gradlew lint test
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Report a bug to help improve WeekView
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots or a screen recording to help explain your problem.

**Additional context**
- Android version: [e.g. Android 9.0]
- WeekView version: [e.g. 3.4.2]
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-suggestion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature suggestion
about: Suggest a feature for WeekView
title: ''
labels: enhancement
assignees: ''

---

**Is your feature suggestion related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature suggestion here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Other
about: Anything else
title: ''
labels: ''
assignees: ''

---


8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Hi there 👋

Thanks for taking the time to make a pull request – I appreciate your contribution. A few things to keep in mind:
1. **Mention the issue to which this pull request belongs.** If you haven’t opened an issue yet, please do so before opening this pull request.
2. **Make it easy to understand what has changed.** Give a high-level overview of the classes that you have changed.
3. **Provide screenshots or screen recordings.** If your change modifies the visual appearance or behavior, consider adding screenshots (ideally *before* and *after*) or a screen recording.

If you have done all these steps, you can open your pull request. Once lint checks and tests pass, I’ll do my best to review it quickly.
298 changes: 298 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

235 changes: 13 additions & 222 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,234 +1,25 @@
Android Week View
=================

[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/Android-Week-View/Lobby)
**Android Week View** is an Android library for displaying highly customizable calendar views within your app.

**Android Week View** is an android library to display calendars (week view or day view) within the app. It supports custom styling.

![](images/screen-shot.png)
![](images/screen-shot-new.png)

Features
------------

* Week view calendar
* Day view calendar
* Custom styling
* Horizontal and vertical scrolling
* Infinite horizontal scrolling
* Live preview of custom styling in xml preview window

Who uses it
---------------

* [Series Addict](https://play.google.com/store/apps/details?id=com.alamkanak.seriesaddict)
* Using the library? Just [tweet me](https://twitter.com/alamkanak) or [send me an email](mailto:alam.kanak@gmail.com).

Usage
---------
* Display single-day or multi-day calendar views in your app
* Extensive styling customization possible
* Supports JodaTime, ThreeTenABP, and the Java 8 Date API
* Live preview in Android Studio’s layout editor
* Infinite horizontal scrolling
* Interactive via click and scroll listeners
* Written in Kotlin

1. Import the library into your project.
* Grab via maven

```xml
<dependency>
<groupId>com.github.alamkanak</groupId>
<artifactId>android-week-view</artifactId>
<version>1.2.6</version>
<type>aar</type>
</dependency>
```
* Grab via gradle

```groovy
compile 'com.github.alamkanak:android-week-view:1.2.6'
```
2. Add WeekView in your xml layout.

```xml
<com.alamkanak.weekview.WeekView
android:id="@+id/weekView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:eventTextColor="@android:color/white"
app:textSize="12sp"
app:hourHeight="60dp"
app:headerColumnPadding="8dp"
app:headerColumnTextColor="#8f000000"
app:headerRowPadding="12dp"
app:columnGap="8dp"
app:noOfVisibleDays="3"
app:headerRowBackgroundColor="#ffefefef"
app:dayBackgroundColor="#05000000"
app:todayBackgroundColor="#1848adff"
app:headerColumnBackground="#ffffffff"/>
```
3. Write the following code in your java file.

```java
// Get a reference for the week view in the layout.
mWeekView = (WeekView) findViewById(R.id.weekView);

// Set an action when any event is clicked.
mWeekView.setOnEventClickListener(mEventClickListener);

// The week view has infinite scrolling horizontally. We have to provide the events of a
// month every time the month changes on the week view.
mWeekView.setMonthChangeListener(mMonthChangeListener);

// Set long press listener for events.
mWeekView.setEventLongPressListener(mEventLongPressListener);
```
4. Implement `WeekView.MonthChangeListener`, `WeekView.EventClickListener`, `WeekView.EventLongPressListener` according to your need.

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.

```java
MonthLoader.MonthChangeListener mMonthChangeListener = new MonthLoader.MonthChangeListener() {
@Override
public List<WeekViewEvent> onMonthChange(int newYear, int newMonth) {
// Populate the week view with some events.
List<WeekViewEvent> events = getEvents(newYear, newMonth);
return events;
}
};
```

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`
- `columnGap`
- `dayBackgroundColor`
- `dayNameLength`
- `eventMarginVertical`
- `eventPadding`
- `eventTextColor`
- `eventTextSize`
- `firstDayOfWeek`
- `headerColumnBackground`
- `headerColumnPadding`
- `headerColumnTextColor`
- `headerRowBackgroundColor`
- `headerRowPadding`
- `hourHeight`
- `hourSeparatorColor`
- `hourSeparatorHeight`
- `noOfVisibleDays`
- `overlappingEventGap`
- `textSize`
- `todayBackgroundColor`
- `todayHeaderTextColor`
- `showDistinctPastFutureColor`
- `futureBackgroundColor`
- `pastBackgroundColor`
- `showDistinctWeekendColor`
- `futureWeekendBackgroundColor`
- `pastWeekendBackgroundColor`
- `showNowLine`
- `nowLineColor`
- `nowLineThickness`
- `scrollDuration`

Interfaces
----------

Use the following interfaces according to your need.

- `mWeekView.setWeekViewLoader()` to provide events to the calendar
- `mWeekView.setMonthChangeListener()` to provide events to the calendar by months
- `mWeekView.setOnEventClickListener()` to get a callback when an event is clicked
- `mWeekView.setEventLongPressListener()` to get a callback when an event is long pressed
- `mWeekView.setEmptyViewClickListener()` to get a callback when any empty space is clicked
- `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

Sample
----------

There is also a [sample app](https://github.com/alamkanak/Android-Week-View/tree/master/sample) to get you started.

To do
-------

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

Changelog
Getting started
---------

**Version 1.2.6**

* Add empty view click listener
* Fix padding bug
* Fix bug when setting colors of different components
* Add ability to turn off fling gesture
* Add example of how to load events asynchronously in the sample app

**Version 1.2.5**

* Add support for using subclasses of `WeekViewEvent`
* Fix scroll animation
* Add support for semi-transparent header colors

**Version 1.2.4**

* **NOTE:** If you are using `WeekView.MonthChangeListener`, make sure to change it into `MonthLoader.MonthChangeListener`
* Add support to have loaders other than MonthViewLoader
* Add pinch to zoom support
* Add support for location
* Add ability to have different colors for past, future, weekend days
* Add support for "now" line

**Version 1.2.3**

* Get callbacks when scrolling horizontally
* `goToHour` and `goToDate` methods has been fixed
* Use `getFirstVisibleHour` method to get the first visible hour in the week view

**Version 1.2.1**

* Better scrolling added
* Get callbacks when empty view is tapped/long pressed
* Control the speed of scrolling
* Support for multiple language added
* Ability to set your own interpreter for header row and column added

**Version 1.1.7**

* You can now dynamically scroll to an hour of your preference.

**Version 1.1.6**

* Added support for events that expands to multiple days

**Version 1.1.5**

* A bug related to overlapping events fixed
* You can now programmatically get first and last visible day in the week view

**Version 1.1.4**

* Small bug fixed

**Version 1.1.3**

* Margins support added for overlapping events

**Version 1.1.2**

* Small bugs fixed
* Hour separator inconsistency fixed

**Version 1.1.1**

* Overlapping event bug fixed

**Version 1.1.0**

* Added support for overlapping events
* Check out [the wiki](https://github.com/thellmund/Android-Week-View/wiki) on how to get started.
* Take a look at the [sample app](https://github.com/thellmund/Android-Week-View/tree/develop/sample) for more details on how to use `WeekView`.
* See the [changelog](https://github.com/thellmund/Android-Week-View/blob/develop/CHANGELOG.md) for new functionality and updates to the API.

License
----------
Expand Down
1 change: 1 addition & 0 deletions base/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
24 changes: 24 additions & 0 deletions base/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
}

group = 'com.github.thellmund.Android-Week-View'
version = '5.3.0'

android {
compileSdkVersion buildConfig.compileSdk
defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation libraries.kotlin
}
Empty file added base/consumer-rules.pro
Empty file.
Loading