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

TimeMode设置为None时,DatimeWheelLayout显示内容无法居中 #333

Open
GrizzlyRen opened this issue Feb 28, 2023 · 1 comment
Open

Comments

@GrizzlyRen
Copy link

GrizzlyRen commented Feb 28, 2023

AndroidView(
            modifier = Modifier
                .fillMaxWidth()
                .height(222.dp),
            factory = {
                val view = DatimeWheelLayout(it)

                view.layoutParams = ViewGroup.LayoutParams(
                    ViewGroup.LayoutParams.MATCH_PARENT,
                    ViewGroup.LayoutParams.MATCH_PARENT
                )

                view.setDateMode(DateMode.YEAR_MONTH_DAY)
                view.setTimeMode(TimeMode.NONE)
                view.setDateFormatter(UnitDateFormatter())
                view.setRange(DatimeEntity.now(), DatimeEntity.monthOnFuture(3))
                view
            },
        )

我打算只选择年月日,按照代码设置之后,显示的内容无法撑满宽度,如果不设置TimeMode,就会显示时、分,请问如何解决呢?版本4.1.11
image

@liyujiang-gzu
Copy link
Member

@GrizzlyRen 只选择年月日的话,用 DateWheelLayout

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