You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strange gap between second and third element in WeekCalendar. Also not all containers are same size when aspectRatio(1f).
First two are a bit bigger than the others.
To Reproduce (if applicable)
Steps to reproduce the behavior:
1, Run in preview mode or run app
Expected behavior (if applicable)
No gap, same size
Screenshots? (if applicable)
Additional information
Code used:
val state = rememberWeekCalendarState(
startDate = startWeek,
endDate = endWeek,
firstVisibleWeekDate = LocalDate.now(),
firstDayOfWeek = DayOfWeek.MONDAY
)
val visibleWeek = rememberFirstVisibleWeekAfterScroll(state = state)
Text(text = getWeekPageTitle(visibleWeek))
WeekCalendar(
state = state,
dayContent = { Day(it, {}) },
)
Text("123")
@Composable
fun Day(day: WeekDay, onClick: (CalendarDay) -> Unit) {
Box(
modifier = Modifier.aspectRatio(1f).background(Color.Green),
contentAlignment = Alignment.Center
) { // Change the color of in-dates and out-dates, you can also hide them completely!
Text(
text = day.date.dayOfMonth.toString(),
)
}
}
The text was updated successfully, but these errors were encountered:
Also not all containers are same size when aspectRatio(1f). First two are a bit bigger than the others.
I think this happens when calendar width is not fully divisible by 7, the layout will assign the remaining pixels to one of the day items to fill the space.
There's no logic internally for the row that contains these composables. Is the current behavior hindering usage in some way?
Library information:
Describe the bug**
Strange gap between second and third element in WeekCalendar. Also not all containers are same size when aspectRatio(1f).
First two are a bit bigger than the others.
To Reproduce (if applicable)
Steps to reproduce the behavior:
1, Run in preview mode or run app
Expected behavior (if applicable)
No gap, same size
Screenshots? (if applicable)
Additional information
Code used:
The text was updated successfully, but these errors were encountered: