Skip to content

Commit 7859aea

Browse files
author
Shrikanth Ravi
authored
Update README.md
1 parent b85b296 commit 7859aea

File tree

1 file changed

+89
-2
lines changed

1 file changed

+89
-2
lines changed

README.md

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,96 @@ Collapsible CalendarView is a simple calendar view which can be collapsed and ex
33

44
Still in Active development.
55

6-
<img src="https://drive.google.com/uc?id=1tOocqnS0pI6V07-JROte0Rx7vqMqFmPg" width="400" >
6+
<img src="https://drive.google.com/uc?id=1tOocqnS0pI6V07-JROte0Rx7vqMqFmPg" width="300" >
77

8-
## License
8+
### Version
9+
[![](https://jitpack.io/v/shrikanth7698/Collapsible-Calendar-View-Android.svg)](https://jitpack.io/#shrikanth7698/Collapsible-Calendar-View-Android)
10+
11+
### Installation
12+
13+
Add it in your root build.gradle at the end of repositories:
14+
```gradle
15+
allprojects {
16+
repositories {
17+
...
18+
maven { url 'https://jitpack.io' }
19+
}
20+
}
21+
```
22+
23+
Add the dependency in your app build.gradle
24+
```gradle
25+
dependencies {
26+
compile 'com.github.shrikanth7698:Collapsible-Calendar-View-Android:v0.0.1'
27+
}
28+
```
29+
30+
### Usage
31+
32+
Drop the Collapsible CalendarView in your XML layout as is shown below:
33+
```xml
34+
<com.shrikanthravi.collapsiblecalendarview.widget.CollapsibleCalendar
35+
android:layout_width="match_parent"
36+
android:layout_height="wrap_content"
37+
android:id="@+id/calendarView">
38+
</com.shrikanthravi.collapsiblecalendarview.widget.CollapsibleCalendar>
39+
```
40+
41+
And then in your Activity or fragment
42+
```java
43+
final CollapsibleCalendar collapsibleCalendar = findViewById(R.id.calendarView);
44+
collapsibleCalendar.setCalendarListener(new CollapsibleCalendar.CalendarListener() {
45+
@Override
46+
public void onDaySelect() {
47+
Day day = viewCalendar.getSelectedDay();
48+
Log.i(getClass().getName(), "Selected Day: "
49+
+ day.getYear() + "/" + (day.getMonth() + 1) + "/" + day.getDay());
50+
}
51+
52+
@Override
53+
public void onItemClick(View view) {
54+
55+
}
56+
57+
@Override
58+
public void onDataUpdate() {
59+
60+
}
61+
62+
@Override
63+
public void onMonthChange() {
64+
65+
}
66+
67+
@Override
68+
public void onWeekChange(int i) {
69+
70+
}
71+
});
72+
```
73+
74+
### Customization
75+
76+
77+
```xml
78+
<com.shrikanthravi.collapsiblecalendarview.widget.CollapsibleCalendar
79+
android:layout_width="match_parent"
80+
android:layout_height="wrap_content"
81+
app:primaryColor="@color/google_red"
82+
app:textColor="@android:color/white"
83+
app:selectedItem_textColor="@color/google_red"
84+
app:todayItem_textColor="@android:color/white"
85+
app:todayItem_background="@drawable/circle_white_stroke_background"
86+
app:selectedItem_background="@drawable/circle_white_solid_background"
87+
app:buttonLeft_drawableTintColor="@android:color/white"
88+
app:buttonRight_drawableTintColor="@android:color/white"
89+
app:expandIconColor="@android:color/white">
90+
</com.shrikanthravi.collapsiblecalendarview.widget.CollapsibleCalendar>
91+
```
92+
93+
94+
95+
### License
996
```
1097
MIT License
1198

0 commit comments

Comments
 (0)