remove some private variables
This commit is contained in:
parent
1d7ba8ee0a
commit
fcb2725309
|
@ -67,7 +67,7 @@ class YearFragment : Fragment(), YearlyCalendar {
|
|||
if (!mSundayFirst)
|
||||
dayOfWeek--
|
||||
|
||||
monthView.setFirstDay(dayOfWeek)
|
||||
monthView.firstDay = dayOfWeek
|
||||
monthView.setOnClickListener {
|
||||
mListener?.goToDateTime(DateTime().withDate(mYear, i, 1))
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class YearFragment : Fragment(), YearlyCalendar {
|
|||
monthLabel.setTextColor(context.config.primaryColor)
|
||||
|
||||
val monthView = mView.findViewById(res.getIdentifier("month_${now.monthOfYear}", "id", activity.packageName)) as SmallMonthView
|
||||
monthView.setTodaysId(now.dayOfMonth)
|
||||
monthView.todaysId = now.dayOfMonth
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,11 +19,12 @@ class SmallMonthView(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
|
|||
private var textColor = 0
|
||||
private var coloredTextColor = 0
|
||||
private var days = 31
|
||||
private var firstDay = 0
|
||||
private var todaysId = 0
|
||||
private var isLandscape = false
|
||||
private var mEvents: ArrayList<Int>? = null
|
||||
|
||||
var firstDay = 0
|
||||
var todaysId = 0
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0)
|
||||
|
||||
fun setDays(days: Int) {
|
||||
|
@ -31,19 +32,11 @@ class SmallMonthView(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
|
|||
invalidate()
|
||||
}
|
||||
|
||||
fun setFirstDay(firstDay: Int) {
|
||||
this.firstDay = firstDay
|
||||
}
|
||||
|
||||
fun setEvents(events: ArrayList<Int>?) {
|
||||
mEvents = events
|
||||
post { invalidate() }
|
||||
}
|
||||
|
||||
fun setTodaysId(id: Int) {
|
||||
todaysId = id
|
||||
}
|
||||
|
||||
init {
|
||||
val attributes = context.theme.obtainStyledAttributes(
|
||||
attrs,
|
||||
|
|
Loading…
Reference in New Issue