-
Notifications
You must be signed in to change notification settings - Fork 125
CardWeekPickerDialog 使用说明
LOPER7 edited this page Sep 13, 2022
·
4 revisions
//kotlin
CardWeekPickerDialog.builder(context)
.setOnChoose("选择") {weekData,formatValue ->
}.build().show()
CardWeekPickerDialog.builder(context)
.setTitle("WEEK PICKER")//设置弹窗标题
.setBackGroundModel(model)//设置弹窗样式类型
.setWrapSelectorWheel(false)//设置picker是否可循环滚动
.setDefaultMillisecond(defaultDate)//通过时间戳设置默认选中周
.setStartMillisecond(minDate)//通过时间戳设置开始周
.setAssistColor(Color.parseColor("#DDFFFFFF"))//设置弹窗辅助文字颜色
.setDividerColor(Color.parseColor("#222222"))//设置分割线颜色
.setEndMillisecond(maxDate)//通过时间戳设置结束周
.setThemeColor(Color.parseColor("#FF8000"))//设置主题颜色
.setFormatter {//设置数据格式化样式
NumberPicker.Formatter { value: Int ->
var weekData = it[value - 1].toFormatList("MM月dd日")
var str = "从${weekData.first()} 开始到 ${weekData.last()}结束"
str
}
}
.setOnChoose("选择") {weekData,formatValue ->
//选择按钮回调监听
btnCardDialogShow.text = formatValue
}
.setOnCancel("关闭") {
//关闭按钮回调监听
}.build().show()