Skip to content

Commit 179ea0f

Browse files
committed
Changed class name
1 parent 60cc8ea commit 179ea0f

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

.idea/gradle.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

InfiniteScrollableCalendarView/src/main/java/dev/abhaycloud/infinitescrollablecalendarview/InfiniteScrollableCalendarView.kt

+14-14
Original file line numberDiff line numberDiff line change
@@ -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 {

InfiniteScrollableCalendarView/src/main/res/values/attrs.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<declare-styleable name="HorizontalRecyclerCalendar">
3+
<declare-styleable name="InfiniteScrollableCalendarView">
44
<attr name="showTitle" format="boolean"/>
55
<attr name="startDate" format="string"/>
66
<attr name="normalDateBackground" format="reference"/>

0 commit comments

Comments
 (0)