add a weekly calendar implementation placeholder
This commit is contained in:
parent
9dba6e05ef
commit
80dd147799
|
@ -12,13 +12,12 @@ class MonthlyCalendarImpl(val mCallback: MonthlyCalendar, val mContext: Context)
|
||||||
private val DAYS_CNT = 42
|
private val DAYS_CNT = 42
|
||||||
private val YEAR_PATTERN = "YYYY"
|
private val YEAR_PATTERN = "YYYY"
|
||||||
|
|
||||||
private val mToday: String
|
private val mToday: String = DateTime().toString(Formatter.DAYCODE_PATTERN)
|
||||||
var mEvents: List<Event>
|
var mEvents: List<Event>
|
||||||
|
|
||||||
lateinit var mTargetDate: DateTime
|
lateinit var mTargetDate: DateTime
|
||||||
|
|
||||||
init {
|
init {
|
||||||
mToday = DateTime().toString(Formatter.DAYCODE_PATTERN)
|
|
||||||
mEvents = ArrayList<Event>()
|
mEvents = ArrayList<Event>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.simplemobiletools.calendar.helpers
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import com.simplemobiletools.calendar.interfaces.WeeklyCalendar
|
||||||
|
import com.simplemobiletools.calendar.models.Event
|
||||||
|
import org.joda.time.DateTime
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
class WeeklyCalendarImpl(val mCallback: WeeklyCalendar, val mContext: Context) : DBHelper.GetEventsListener {
|
||||||
|
var mEvents: List<Event>
|
||||||
|
|
||||||
|
lateinit var mTargetDate: DateTime
|
||||||
|
|
||||||
|
init {
|
||||||
|
mEvents = ArrayList<Event>()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateWeeklyCalendar(targetDate: DateTime) {
|
||||||
|
mTargetDate = targetDate
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun gotEvents(events: MutableList<Event>) {
|
||||||
|
mEvents = events
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.simplemobiletools.calendar.interfaces
|
||||||
|
|
||||||
|
import com.simplemobiletools.calendar.models.Event
|
||||||
|
|
||||||
|
interface WeeklyCalendar {
|
||||||
|
fun updateWeeklyCalendar(events: List<Event>)
|
||||||
|
}
|
Loading…
Reference in New Issue