forked from Quivr/Android-Week-View
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-converted project to Kotlin. Code can be shortened a lot, but requir…
…es some delicate work. -fixed some time/date formatting related issues: alamkanak#497 alamkanak#495 (but not fixed RTL alignment issue) -created a new activity to demonstrate the paging of entire view (example: week by week snapping), based on this pull request: Quivr#88
- Loading branch information
1 parent
0f2acef
commit b19ee50
Showing
20 changed files
with
633 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<manifest package="com.alamkanak.weekview"></manifest> | ||
<manifest package="com.alamkanak.weekview"/> |
2 changes: 1 addition & 1 deletion
2
library/src/main/java/com/alamkanak/weekview/DateTimeInterpreter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
602 changes: 308 additions & 294 deletions
602
library/src/main/java/com/alamkanak/weekview/WeekView.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 25 additions & 25 deletions
50
library/src/main/java/com/alamkanak/weekview/WeekViewLoader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
package com.alamkanak.weekview | ||
|
||
import java.util.Calendar | ||
|
||
interface WeekViewLoader { | ||
/** | ||
* Convert a date into a double that will be used to reference when you're loading data. | ||
* | ||
* | ||
* All periods that have the same integer part, define one period. Dates that are later in time | ||
* should have a greater return value. | ||
* | ||
* @param instance the date | ||
* @return The period index in which the date falls (floating point number). | ||
*/ | ||
fun toWeekViewPeriodIndex(instance: Calendar): Double | ||
|
||
/** | ||
* Load the events within the period | ||
* | ||
* @param periodIndex the period to load | ||
* @return A list with the events of this period | ||
*/ | ||
fun onLoad(periodIndex: Int): List<WeekViewEvent> | ||
} | ||
package com.alamkanak.weekview | ||
|
||
import java.util.* | ||
|
||
interface WeekViewLoader { | ||
/** | ||
* Convert a date into a double that will be used to reference when you're loading data. | ||
* | ||
* | ||
* All periods that have the same integer part, define one period. Dates that are later in time | ||
* should have a greater return value. | ||
* | ||
* @param instance the date | ||
* @return The period index in which the date falls (floating point number). | ||
*/ | ||
fun toWeekViewPeriodIndex(instance: Calendar): Double | ||
|
||
/** | ||
* Load the events within the period | ||
* | ||
* @param periodIndex the period to load | ||
* @return A list with the events of this period | ||
*/ | ||
fun onLoad(periodIndex: Int): List<WeekViewEvent>? | ||
} |
Oops, something went wrong.