Skip to content

Commit f94325e

Browse files
author
kgoel
committed
Moved to androidx and added gesture for left and right swipe
1 parent bf2eb90 commit f94325e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class CollapsibleCalendar : UICalendar, View.OnClickListener {
232232
for (i in 0 until mAdapter!!.count) {
233233
val day = mAdapter!!.getItem(i)
234234
val view = mAdapter!!.getView(i)
235-
val txtDay = view.findViewById<View>(com.shrikanthravi.collapsiblecalendarview.R.id.txt_day) as TextView
235+
val txtDay = view.findViewById<View>(R.id.txt_day) as TextView
236236
txtDay.setBackgroundColor(Color.TRANSPARENT)
237237
txtDay.setTextColor(textColor)
238238

collapsiblecalendarview2/src/main/java/com/shrikanthravi/collapsiblecalendarview/widget/UICalendar.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ abstract class UICalendar constructor(context: Context, attrs: AttributeSet? = n
103103
field = todayItemTextColor
104104
redraw()
105105
}
106-
var todayItemBackgroundDrawable = resources.getDrawable(com.shrikanthravi.collapsiblecalendarview.R.drawable.circle_black_stroke_background)
106+
var todayItemBackgroundDrawable = resources.getDrawable(R.drawable.circle_black_stroke_background)
107107
set(todayItemBackgroundDrawable) {
108108
field = todayItemBackgroundDrawable
109109
redraw()
@@ -113,7 +113,7 @@ abstract class UICalendar constructor(context: Context, attrs: AttributeSet? = n
113113
field = selectedItemTextColor
114114
redraw()
115115
}
116-
var selectedItemBackgroundDrawable = resources.getDrawable(com.shrikanthravi.collapsiblecalendarview.R.drawable.circle_black_solid_background)
116+
var selectedItemBackgroundDrawable = resources.getDrawable(R.drawable.circle_black_solid_background)
117117
set(selectedItemBackground) {
118118
field = selectedItemBackground
119119
redraw()
@@ -122,7 +122,7 @@ abstract class UICalendar constructor(context: Context, attrs: AttributeSet? = n
122122
/**
123123
* This can be used to defined the left icon drawable other than predefined icon
124124
*/
125-
var buttonLeftDrawable = resources.getDrawable(com.shrikanthravi.collapsiblecalendarview.R.drawable.left_icon)
125+
var buttonLeftDrawable = resources.getDrawable(R.drawable.left_icon)
126126
set(buttonLeftDrawable) {
127127
field = buttonLeftDrawable
128128
mBtnPrevMonth.setImageDrawable(buttonLeftDrawable)
@@ -132,7 +132,7 @@ abstract class UICalendar constructor(context: Context, attrs: AttributeSet? = n
132132
/**
133133
* This can be used to set the drawable for the right icon, other than predefined icon
134134
*/
135-
var buttonRightDrawable = resources.getDrawable(com.shrikanthravi.collapsiblecalendarview.R.drawable.right_icon)
135+
var buttonRightDrawable = resources.getDrawable(R.drawable.right_icon)
136136
set(buttonRightDrawable) {
137137
field = buttonRightDrawable
138138
mBtnNextMonth.setImageDrawable(buttonRightDrawable)
@@ -219,7 +219,7 @@ abstract class UICalendar constructor(context: Context, attrs: AttributeSet? = n
219219
mScrollViewBody.setOnTouchListener(getSwipe(context))
220220
mScrollViewBody.setParams(getSwipe(context))
221221
val attributes = context.theme.obtainStyledAttributes(
222-
attrs, com.shrikanthravi.collapsiblecalendarview.R.styleable.UICalendar, defStyleAttr, 0)
222+
attrs, R.styleable.UICalendar, defStyleAttr, 0)
223223
setAttributes(attributes)
224224
attributes.recycle()
225225
}
@@ -272,7 +272,7 @@ abstract class UICalendar constructor(context: Context, attrs: AttributeSet? = n
272272
selectedItemBackgroundDrawable = this.selectedItemBackgroundDrawable
273273
}
274274

275-
var buttonLeftDrawable = attrs.getDrawable(com.shrikanthravi.collapsiblecalendarview.R.styleable.UICalendar_buttonLeft_drawable)
275+
var buttonLeftDrawable = attrs.getDrawable(R.styleable.UICalendar_buttonLeft_drawable)
276276
if (buttonLeftDrawable != null) {
277277
buttonLeftDrawable = buttonLeftDrawable
278278
} else {

0 commit comments

Comments
 (0)