commandiron / WheelPickerCompose

Add Wheel Date - Time Picker in Android Jetpack Compose.
Apache License 2.0
475 stars 57 forks source link

Add note in doc and API comment that rowCount should be odd #24

Open gargVader opened 1 year ago

gargVader commented 1 year ago

When the rowCount is even, then the middle two rows are highlighted. Odd count gives correct behavior

commandiron commented 1 year ago

Hi, you are right. I realized before. Comment could be useful too. I will add next release. Actually row count must be get only odd paramenters but i couldn't find any function about this like IntRange. Any idea?

kasiopec commented 1 year ago

You could maybe do something like val rowCount = if (listPickerContent.size % 2 == 0) listPickerContent.size + 1 else listPickerContent.size