@@ -29,10 +29,10 @@ import java.time.LocalDate
2929 */
3030
3131/* *
32- * HorizontalCalendar class
32+ * InfiniteScrollableCalendarView class
3333 * implements OnMonthChangedListener, OnBindListener, OnDateSelectedListener
3434 */
35- class HorizontalCalendar (context : Context , attrs : AttributeSet ): ConstraintLayout(context, attrs),
35+ class InfiniteScrollableCalendarView (context : Context , attrs : AttributeSet ): ConstraintLayout(context, attrs),
3636 OnMonthChangedListener , OnBindListener , OnDateSelectedListener {
3737
3838 /* *
@@ -85,7 +85,7 @@ class HorizontalCalendar(context: Context, attrs: AttributeSet): ConstraintLayou
8585 init {
8686 LayoutInflater .from(context).inflate(R .layout.infinte_calendar_view, this , true );
8787 getViewElements();
88- setAttributeValues(context.theme.obtainStyledAttributes(attrs, R .styleable.HorizontalRecyclerCalendar , 0 , 0 ))
88+ setAttributeValues(context.theme.obtainStyledAttributes(attrs, R .styleable.InfiniteScrollableCalendarView , 0 , 0 ))
8989 initView();
9090 }
9191
@@ -97,20 +97,20 @@ class HorizontalCalendar(context: Context, attrs: AttributeSet): ConstraintLayou
9797 @SuppressLint(" NewApi" )
9898 private fun setAttributeValues (a : TypedArray ){
9999 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()
102102 normalDateBg =
103- a.getDrawable(R .styleable.HorizontalRecyclerCalendar_normalDateBackground )!!
103+ a.getDrawable(R .styleable.InfiniteScrollableCalendarView_normalDateBackground )!!
104104 selectedDateBg =
105- a.getDrawable(R .styleable.HorizontalRecyclerCalendar_selectedDateBackground )!!
105+ a.getDrawable(R .styleable.InfiniteScrollableCalendarView_selectedDateBackground )!!
106106 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 )
114114// fontStyle = a.getFont(R.styleable.HorizontalRecyclerCalendar_dateFontStyle)!!
115115 }
116116 finally {
0 commit comments