@@ -29,10 +29,10 @@ import java.time.LocalDate
29
29
*/
30
30
31
31
/* *
32
- * HorizontalCalendar class
32
+ * InfiniteScrollableCalendarView class
33
33
* implements OnMonthChangedListener, OnBindListener, OnDateSelectedListener
34
34
*/
35
- class HorizontalCalendar (context : Context , attrs : AttributeSet ): ConstraintLayout(context, attrs),
35
+ class InfiniteScrollableCalendarView (context : Context , attrs : AttributeSet ): ConstraintLayout(context, attrs),
36
36
OnMonthChangedListener , OnBindListener , OnDateSelectedListener {
37
37
38
38
/* *
@@ -85,7 +85,7 @@ class HorizontalCalendar(context: Context, attrs: AttributeSet): ConstraintLayou
85
85
init {
86
86
LayoutInflater .from(context).inflate(R .layout.infinte_calendar_view, this , true );
87
87
getViewElements();
88
- setAttributeValues(context.theme.obtainStyledAttributes(attrs, R .styleable.HorizontalRecyclerCalendar , 0 , 0 ))
88
+ setAttributeValues(context.theme.obtainStyledAttributes(attrs, R .styleable.InfiniteScrollableCalendarView , 0 , 0 ))
89
89
initView();
90
90
}
91
91
@@ -97,20 +97,20 @@ class HorizontalCalendar(context: Context, attrs: AttributeSet): ConstraintLayou
97
97
@SuppressLint(" NewApi" )
98
98
private fun setAttributeValues (a : TypedArray ){
99
99
try {
100
- showTitle = a.getBoolean(R .styleable.HorizontalRecyclerCalendar_showTitle , true )
101
- startDate = a.getString(R .styleable.HorizontalRecyclerCalendar_startDate ).toString()
100
+ showTitle = a.getBoolean(R .styleable.InfiniteScrollableCalendarView_showTitle , true )
101
+ startDate = a.getString(R .styleable.InfiniteScrollableCalendarView_startDate ).toString()
102
102
normalDateBg =
103
- a.getDrawable(R .styleable.HorizontalRecyclerCalendar_normalDateBackground )!!
103
+ a.getDrawable(R .styleable.InfiniteScrollableCalendarView_normalDateBackground )!!
104
104
selectedDateBg =
105
- a.getDrawable(R .styleable.HorizontalRecyclerCalendar_selectedDateBackground )!!
105
+ a.getDrawable(R .styleable.InfiniteScrollableCalendarView_selectedDateBackground )!!
106
106
specialDateBg =
107
- a.getDrawable(R .styleable.HorizontalRecyclerCalendar_specialDateBackground )!!
108
- normalDayTextColor = a.getColor(R .styleable.HorizontalRecyclerCalendar_normalDayTextColor , Color .BLACK )
109
- normalDateTextColor = a.getColor(R .styleable.HorizontalRecyclerCalendar_normalDateTextColor , Color .BLACK )
110
- specialDayTextColor = a.getColor(R .styleable.HorizontalRecyclerCalendar_specialDayTextColor , Color .BLACK )
111
- specialDateTextColor = a.getColor(R .styleable.HorizontalRecyclerCalendar_specialDateTextColor , Color .BLACK )
112
- selectedDayTextColor = a.getColor(R .styleable.HorizontalRecyclerCalendar_selectedDayTextColor , Color .BLACK )
113
- selectedDateTextColor = a.getColor(R .styleable.HorizontalRecyclerCalendar_selectedDateTextColor , Color .BLACK )
107
+ a.getDrawable(R .styleable.InfiniteScrollableCalendarView_specialDateBackground )!!
108
+ normalDayTextColor = a.getColor(R .styleable.InfiniteScrollableCalendarView_normalDayTextColor , Color .BLACK )
109
+ normalDateTextColor = a.getColor(R .styleable.InfiniteScrollableCalendarView_normalDateTextColor , Color .BLACK )
110
+ specialDayTextColor = a.getColor(R .styleable.InfiniteScrollableCalendarView_specialDayTextColor , Color .BLACK )
111
+ specialDateTextColor = a.getColor(R .styleable.InfiniteScrollableCalendarView_specialDateTextColor , Color .BLACK )
112
+ selectedDayTextColor = a.getColor(R .styleable.InfiniteScrollableCalendarView_selectedDayTextColor , Color .BLACK )
113
+ selectedDateTextColor = a.getColor(R .styleable.InfiniteScrollableCalendarView_selectedDateTextColor , Color .BLACK )
114
114
// fontStyle = a.getFont(R.styleable.HorizontalRecyclerCalendar_dateFontStyle)!!
115
115
}
116
116
finally {
0 commit comments