-
Notifications
You must be signed in to change notification settings - Fork 0
PLASMA-6352: Slider centering was fixed #653
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
base: develop
Are you sure you want to change the base?
Conversation
📦 Собранные APK📲 Как установить APK на Android-устройство:
💻 Установка через USB (ADB):
|
|
📘Артефакты документации опубликованы: |
eed6bdf to
ab37019
Compare
sdds-core/uikit-compose/src/main/kotlin/com/sdds/compose/uikit/Slider.kt
Outdated
Show resolved
Hide resolved
dae1f4d to
3feb134
Compare
| limMargin: Int, | ||
| labMargin: Int, | ||
| ) : MeasurePolicy { | ||
| private val sizes: MeasuredSizes = MeasuredSizes().apply { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Этот класс с var внутри - очень сомнительное решение. Его очень легко мутировать и потом не понять, почему и в какой момент изменились его var свойства. Также сомнительна коллекция с Placeable. Почему нельзя обойтись без этих сущностей?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я больше не придумал как это все упорядочить более менее.
как ты можешь заметить MeasuredSizes мне нужны для вычисления каждого из последующих размеров, а так же для вычисления смещения, без них было бы большое количество аргументов в каждой из функции. я посчитал, что data class - будет не очень удобно, так как мне пришлось бы каждый раз копировать для записи новых размеров. ну а коллекция с Placeable - я не представляю какой бы был тогда layout без нее. я готов к обсуждению, если скажешь как это можно все сделать без дополнительных коллекций и гору логики припрятать)))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в MeasuredSizes можно отдельные сеттеры на каждое поле написать, чтоб труднее было изменять их
3feb134 to
c88fa78
Compare
sdds-uikit-compose
Slider
What/why changed
Реализован кастомный layout для расположения и выравнивания дочерних composable