I'm trying to make calendar and what i want to do is when i click each date, the value of each date (let's say specialValue) increase individually from 0 step 1.
I've made Event Decorator which get 2 parameter
one is list of clicked dates and the other one is value of specialValue as i mention above..
As i understand when EventDecorator is added to Calendar which inherits DayViewDecorator, it operates function name 'decorate' when function name 'shouldDecorate' returns true.
how can i operate 'decorate' function with clicked dates individually?
not decorate every clicked dates same..
can you get it?..
for example when i clicked date 1, 2 times and clicked date 2, 3 times
array of clicked date is date 1, 2 and
array of specialValue is 2, 3
i want to decorate date1 as decorate type 2 and date 2 into decorate type 3 individually. not date 1, 2 as same decorate type 2 or either type 3..
Here is some part of my code
//EventDecorator.kt
class EventDecorator(date : MutableList, habitValue : MutableList) : DayViewDecorator {
var thisDate = date
//var thisHabitList = habitList
var thisHabitValue = habitValue
I'm trying to make calendar and what i want to do is when i click each date, the value of each date (let's say specialValue) increase individually from 0 step 1. I've made Event Decorator which get 2 parameter one is list of clicked dates and the other one is value of specialValue as i mention above..
As i understand when EventDecorator is added to Calendar which inherits DayViewDecorator, it operates function name 'decorate' when function name 'shouldDecorate' returns true. how can i operate 'decorate' function with clicked dates individually? not decorate every clicked dates same.. can you get it?..
for example when i clicked date 1, 2 times and clicked date 2, 3 times array of clicked date is date 1, 2 and array of specialValue is 2, 3
i want to decorate date1 as decorate type 2 and date 2 into decorate type 3 individually. not date 1, 2 as same decorate type 2 or either type 3.. Here is some part of my code
//EventDecorator.kt
class EventDecorator(date : MutableList, habitValue : MutableList) : DayViewDecorator {
var thisDate = date
//var thisHabitList = habitList
var thisHabitValue = habitValue
}
//ShowCalendar.kt
calendar.setOnDateChangedListener(object : OnDateSelectedListener { override fun onDateSelected(widget: MaterialCalendarView, date: CalendarDay, selected: Boolean) {
}) calendar.addDecorator(EventDecorator(calendarList, habitValue))