- 基于recyclerView 日历 制作的 星期 预约控件
- 把
maven { url 'https://jitpack.io' }
加入到 repositories 中
- 添加如下依赖,末尾的「latestVersion」 里的版本名称,请自行替换。
dependencies {
implementation 'com.github.AGouLiu:AppointmentTime:latestVersion'
}
val map: MutableMap<String, List<String>> = HashMap() // key 日期 - 时段
var array =ArrayList<String>()
array.add("8:00-9:00-true") // true 可约
array.add("10:00-12:00-false") // false 约满
map["2021-9-29-2"] = array // 日期 -时段 1,上午 2 下午 ,3晚上
var onPageChanged2: ((String, String) -> Unit?)? =null // 页面 切换
var onClickListener: ((CalendarView, Cell) -> Unit)? = null // 点击回调