Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java版本怎么使用 #91

Closed
xiaoniu667 opened this issue Sep 27, 2023 · 2 comments
Closed

java版本怎么使用 #91

xiaoniu667 opened this issue Sep 27, 2023 · 2 comments

Comments

@xiaoniu667
Copy link

No description provided.

@xiaoniu667
Copy link
Author

    var dialog = CardDatePickerDialog.builder(context)
            .setTitle("DATE&TIME PICKER")
            .setDisplayType(displayList)
            .setBackGroundModel(model)

// .setBackGroundModel(if(isDark) R.drawable.shape_bg_dialog_dark else R.drawable.shape_bg_dialog_light)
.showBackNow(checkBackNow.isChecked)
.setMaxTime(maxDate)
.setPickerLayout(pickerLayout)
.setMinTime(minDate)
.setDefaultTime(defaultDate)
.setTouchHideable(true)
.setChooseDateModel(DateTimeConfig.DATE_LUNAR)
.setWrapSelectorWheel(false)
.setThemeColor(if (model == R.drawable.shape_bg_dialog_custom) Color.parseColor("#FF8000") else 0)
// .setAssistColor(Color.parseColor("#DDFFFFFF"))
// .setDividerColor(Color.parseColor("#222222"))
.showDateLabel(checkUnitLabel.isChecked)
.showFocusDateInfo(checkDateInfo.isChecked)
.setOnChoose("选择") {
btnCardDialogShow.text = "${
StringUtils.conversionTime(
it,
"yyyy-MM-dd HH:mm:ss"
)
} ${StringUtils.getWeek(it)}"
}
.setOnCancel("关闭") {
}.build()
dialog.show()
//重点 需要在dialog show 方法后
//得到 BottomSheetDialog 实体,设置其 isHideable 为 fasle
(dialog as BottomSheetDialog).behavior.isHideable = false

@loper7
Copy link
Owner

loper7 commented Sep 28, 2023

不太明白你遇到的问题是什么

@loper7 loper7 closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants