From 075887d384f9231e340e473b432a413c4aca3334 Mon Sep 17 00:00:00 2001 From: Alexander Surinov Date: Thu, 30 Aug 2018 16:38:15 +0300 Subject: [PATCH] Minor changes Add CalendarView Theme with the `calendarViewStyle` attribute to be able to define default style for all calendars from the app theme. Change visibility of `GridDividerItemDecoration` class. --- .../java/ru/cleverpumpkin/calendar/CalendarView.kt | 2 +- .../calendar/decorations/GridDividerItemDecoration.kt | 2 +- crunchycalendar/src/main/res/values/attrs.xml | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/crunchycalendar/src/main/java/ru/cleverpumpkin/calendar/CalendarView.kt b/crunchycalendar/src/main/java/ru/cleverpumpkin/calendar/CalendarView.kt index f50fc70..c2e6a03 100644 --- a/crunchycalendar/src/main/java/ru/cleverpumpkin/calendar/CalendarView.kt +++ b/crunchycalendar/src/main/java/ru/cleverpumpkin/calendar/CalendarView.kt @@ -39,7 +39,7 @@ import java.util.* class CalendarView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - @AttrRes defStyleAttr: Int = 0 + @AttrRes defStyleAttr: Int = R.attr.calendarViewStyle ) : FrameLayout(context, attrs, defStyleAttr) { diff --git a/crunchycalendar/src/main/java/ru/cleverpumpkin/calendar/decorations/GridDividerItemDecoration.kt b/crunchycalendar/src/main/java/ru/cleverpumpkin/calendar/decorations/GridDividerItemDecoration.kt index 162c896..29ef1ba 100644 --- a/crunchycalendar/src/main/java/ru/cleverpumpkin/calendar/decorations/GridDividerItemDecoration.kt +++ b/crunchycalendar/src/main/java/ru/cleverpumpkin/calendar/decorations/GridDividerItemDecoration.kt @@ -10,7 +10,7 @@ import ru.cleverpumpkin.calendar.R import ru.cleverpumpkin.calendar.utils.dpToPix import ru.cleverpumpkin.calendar.utils.getColorInt -class GridDividerItemDecoration( +internal class GridDividerItemDecoration( context: Context, @ColorInt dividerColor: Int = context.getColorInt(R.color.calendar_grid_color), private val drawGridOnSelectedDates: Boolean diff --git a/crunchycalendar/src/main/res/values/attrs.xml b/crunchycalendar/src/main/res/values/attrs.xml index 1af8363..fda6816 100644 --- a/crunchycalendar/src/main/res/values/attrs.xml +++ b/crunchycalendar/src/main/res/values/attrs.xml @@ -1,14 +1,19 @@ + + + + + - - - + + +