
Day, multi-day and week calendar grid with a shared layout engine that places overlapping events side-by-side, supports cross-midnight and all-day events, RTL, localization, pinch-to-zoom.
A day, multi-day and week calendar grid for Android Views and Compose Multiplatform. Both renderers draw from one shared layout engine, so overlapping events are placed side by side and never on top of each other.
In every picture the Compose WeekView is on the left and the Android View on the right.
| Day | Week |
|---|---|
![]() |
![]() |
| Events that cross midnight | Added one at a time |
|---|---|
![]() |
![]() |
| Dark | Font scale 1.8 |
|---|---|
![]() |
![]() |
German, Japanese, Hindi and Arabic (right to left):
| Artifact | What it is | Targets |
|---|---|---|
io.github.androidpoet:weekview |
WeekViewLayout (the layout engine) and WeekView, an Android View
|
Android, JVM, iOS, wasmJs (the View is Android only) |
io.github.androidpoet:weekview-compose |
WeekView composable |
Android, JVM desktop, iOS, wasmJs |
dependencies {
implementation("io.github.androidpoet:weekview:0.1.0") // Views
implementation("io.github.androidpoet:weekview-compose:0.1.0") // Compose
}Events use wall-clock kotlinx.datetime.LocalDateTime. The end is exclusive, and colors are ARGB.
val events = listOf(
WeekViewEvent(
id = "standup",
title = "Standup",
start = LocalDateTime(2026, 3, 2, 9, 0),
end = LocalDateTime(2026, 3, 2, 9, 30),
color = 0xFF0D9488.toInt(),
location = "Room 4",
),
WeekViewEvent(
id = "conference",
title = "Conference",
start = LocalDateTime(2026, 3, 2, 0, 0),
end = LocalDateTime(2026, 3, 4, 0, 0),
isAllDay = true,
),
)val state = rememberWeekViewState()
WeekView(
events = events,
state = state,
visibleDays = 3,
onEventClick = { event -> },
onEmptyClick = { dateTime -> },
modifier = Modifier.fillMaxSize(),
)state.animateScrollToDate(date), state.scrollToHour(8.5f) and state.firstVisibleDate move and
observe the grid. Pass style = WeekViewDefaults.style().copy(...) to change colors and sizes, and
eventContent, dayHeader or timeLabel to draw your own content.
<io.github.androidpoet.weekview.WeekView
android:id="@+id/weekView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:visibleDays="3" />weekView.events = events
weekView.onEventClick = { event -> }
weekView.onEmptyClick = { dateTime -> }
weekView.goToToday()9 AM where a 12-hour clock is used, 09:00 where a 24-hour
clock is. On Android the user's 24-hour setting wins over the locale.now = ... in Compose, weekView.currentTime = { ... } on the View.timeLabel (Compose) or set weekView.timeLabel / weekView.weekdayLabel (View) for your
own labels. localizedHourLabel, localizedWeekdayLabel and localizedDayOfMonth are public.maxAllDayRows rows (3 by default) are shown; a date with more shows a "+N" marker in the last row.WeekViewLayout has no UI dependency and can drive your own renderer:
val layout = WeekViewLayout.of(events)
layout.timedSlots(date).forEach { slot ->
// slot.startMinute, slot.endMinute, slot.left and slot.width (fractions of the day width)
}MIT. See LICENSE.
A day, multi-day and week calendar grid for Android Views and Compose Multiplatform. Both renderers draw from one shared layout engine, so overlapping events are placed side by side and never on top of each other.
In every picture the Compose WeekView is on the left and the Android View on the right.
| Day | Week |
|---|---|
![]() |
![]() |
| Events that cross midnight | Added one at a time |
|---|---|
![]() |
![]() |
| Dark | Font scale 1.8 |
|---|---|
![]() |
![]() |
German, Japanese, Hindi and Arabic (right to left):
| Artifact | What it is | Targets |
|---|---|---|
io.github.androidpoet:weekview |
WeekViewLayout (the layout engine) and WeekView, an Android View
|
Android, JVM, iOS, wasmJs (the View is Android only) |
io.github.androidpoet:weekview-compose |
WeekView composable |
Android, JVM desktop, iOS, wasmJs |
dependencies {
implementation("io.github.androidpoet:weekview:0.1.0") // Views
implementation("io.github.androidpoet:weekview-compose:0.1.0") // Compose
}Events use wall-clock kotlinx.datetime.LocalDateTime. The end is exclusive, and colors are ARGB.
val events = listOf(
WeekViewEvent(
id = "standup",
title = "Standup",
start = LocalDateTime(2026, 3, 2, 9, 0),
end = LocalDateTime(2026, 3, 2, 9, 30),
color = 0xFF0D9488.toInt(),
location = "Room 4",
),
WeekViewEvent(
id = "conference",
title = "Conference",
start = LocalDateTime(2026, 3, 2, 0, 0),
end = LocalDateTime(2026, 3, 4, 0, 0),
isAllDay = true,
),
)val state = rememberWeekViewState()
WeekView(
events = events,
state = state,
visibleDays = 3,
onEventClick = { event -> },
onEmptyClick = { dateTime -> },
modifier = Modifier.fillMaxSize(),
)state.animateScrollToDate(date), state.scrollToHour(8.5f) and state.firstVisibleDate move and
observe the grid. Pass style = WeekViewDefaults.style().copy(...) to change colors and sizes, and
eventContent, dayHeader or timeLabel to draw your own content.
<io.github.androidpoet.weekview.WeekView
android:id="@+id/weekView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:visibleDays="3" />weekView.events = events
weekView.onEventClick = { event -> }
weekView.onEmptyClick = { dateTime -> }
weekView.goToToday()9 AM where a 12-hour clock is used, 09:00 where a 24-hour
clock is. On Android the user's 24-hour setting wins over the locale.now = ... in Compose, weekView.currentTime = { ... } on the View.timeLabel (Compose) or set weekView.timeLabel / weekView.weekdayLabel (View) for your
own labels. localizedHourLabel, localizedWeekdayLabel and localizedDayOfMonth are public.maxAllDayRows rows (3 by default) are shown; a date with more shows a "+N" marker in the last row.WeekViewLayout has no UI dependency and can drive your own renderer:
val layout = WeekViewLayout.of(events)
layout.timedSlots(date).forEach { slot ->
// slot.startMinute, slot.endMinute, slot.left and slot.width (fractions of the day width)
}MIT. See LICENSE.