Skip to content

Commit f42080b

Browse files
author
shrikanth7698
committed
Added method to hide or show expand icon
1 parent 88b9723 commit f42080b

File tree

8 files changed

+24
-34
lines changed

8 files changed

+24
-34
lines changed

.idea/caches/gradle_models.ser

130 KB
Binary file not shown.

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.idea/copyright/Shrikanth_Ravi.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ISSUE_TEMPLATE.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/src/main/java/com/shrikanthravi/collapsiblecalendarview/MainActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ protected void onCreate(Bundle savedInstanceState) {
2323
getWindow().setStatusBarColor(getResources().getColor(R.color.google_red));
2424

2525
CollapsibleCalendar collapsibleCalendar = findViewById(R.id.collapsibleCalendarView);
26+
//To hide or show expand icon
27+
collapsibleCalendar.setExpandIconVisible(true);
2628
Calendar today=new GregorianCalendar();
2729
collapsibleCalendar.addEventTag(today.get(Calendar.YEAR),today.get(Calendar.MONTH),today.get(Calendar.DAY_OF_MONTH));
2830
today.add(Calendar.DATE,1);

collapsiblecalendarview2/src/main/java/com/shrikanthravi/collapsiblecalendarview/widget/CollapsibleCalendar.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ public void addEventTag(int numYear, int numMonth, int numDay) {
314314
public void addEventTag(int numYear, int numMonth, int numDay,int color) {
315315
mAdapter.addEvent(new Event(numYear, numMonth, numDay,color));
316316

317+
317318
reload();
318319
}
319320

@@ -600,6 +601,14 @@ public interface CalendarListener {
600601
void onWeekChange(int position);
601602
}
602603

604+
public void setExpandIconVisible(boolean visible){
605+
if(visible){
606+
expandIconView.setVisibility(VISIBLE);
607+
}else {
608+
expandIconView.setVisibility(GONE);
609+
}
610+
}
611+
603612

604613

605614
}

0 commit comments

Comments
 (0)