Skip to content

Commit ac15f19

Browse files
authored
Drag-and-drop implementation (cleanup) (#77)
* Drag-and-drop implementation * reformatting * DropListener can be disabled
1 parent 39cf84b commit ac15f19

File tree

20 files changed

+547
-403
lines changed

20 files changed

+547
-403
lines changed

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
VERSION_NAME=2.2.1
22
GROUP=com.github.quivr
3-
43
POM_DESCRIPTION=An android library to show day view, week view, 3 day view etc. in your app.
54
POM_URL=https://github.com/Quivr/Android-Week-View
65
POM_SCM_URL=https://github.com/Quivr/Android-Week-View

library/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ repositories {
55
}
66

77
android {
8-
compileSdkVersion 23
9-
buildToolsVersion '25.0.0'
8+
compileSdkVersion 25
9+
buildToolsVersion '25.0.2'
1010

1111
defaultConfig {
1212
minSdkVersion 9
13-
targetSdkVersion 23
13+
targetSdkVersion 25
1414
}
1515
}
1616

1717
configurations {
1818
javadocDeps
1919
}
2020
dependencies {
21-
compile 'com.android.support:appcompat-v7:23.1.1'
22-
javadocDeps 'com.android.support:appcompat-v7:23.1.1'
21+
compile 'com.android.support:appcompat-v7:25.1.0'
22+
javadocDeps 'com.android.support:appcompat-v7:25.1.0'
2323
}
2424

2525
apply from: 'gradle-mvn-push.gradle'
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
<manifest package="com.alamkanak.weekview">
2-
</manifest>
1+
<manifest package="com.alamkanak.weekview"></manifest>

library/src/main/java/com/alamkanak/weekview/DateTimeInterpreter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
*/
88
public interface DateTimeInterpreter {
99
public String interpretDate(Calendar date);
10+
1011
public String interpretTime(int hour, int minutes);
1112
}

library/src/main/java/com/alamkanak/weekview/MonthLoader.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ public class MonthLoader implements WeekViewLoader {
77

88
private MonthChangeListener mOnMonthChangeListener;
99

10-
public MonthLoader(MonthChangeListener listener){
10+
public MonthLoader(MonthChangeListener listener) {
1111
this.mOnMonthChangeListener = listener;
1212
}
1313

1414
@Override
15-
public double toWeekViewPeriodIndex(Calendar instance){
15+
public double toWeekViewPeriodIndex(Calendar instance) {
1616
return instance.get(Calendar.YEAR) * 12 + instance.get(Calendar.MONTH) + (instance.get(Calendar.DAY_OF_MONTH) - 1) / 30.0;
1717
}
1818

1919
@Override
20-
public List<? extends WeekViewEvent> onLoad(int periodIndex){
20+
public List<? extends WeekViewEvent> onLoad(int periodIndex) {
2121
return mOnMonthChangeListener.onMonthChange(periodIndex / 12, periodIndex % 12 + 1);
2222
}
2323

@@ -34,7 +34,8 @@ public interface MonthChangeListener {
3434
* <p>Very important interface, it's the base to load events in the calendar.
3535
* This method is called three times: once to load the previous month, once to load the next month and once to load the current month.</p>
3636
* <strong>That's why you can have three times the same event at the same place if you mess up with the configuration</strong>
37-
* @param newYear : year of the events required by the view.
37+
*
38+
* @param newYear : year of the events required by the view.
3839
* @param newMonth : <p>month of the events required by the view </p><strong>1 based (not like JAVA API) : January = 1 and December = 12</strong>.
3940
* @return a list of the events happening <strong>during the specified month</strong>.
4041
*/

0 commit comments

Comments
 (0)