Open tchouaffe opened 1 year ago
I tried using AndroidView, and it works fine.
AndroidView(modifier = Modifier.fillMaxSize(), factory = { context ->
val calendar = MaterialCalendarView(context)
calendar.apply {
//initial settings
}
}
Is it possible to use this calendar within jetpack compose? I am getting an error doing so.
compose code:
@Composable fun MaterialCalendarView() { val color = MaterialTheme.colorScheme.surface.toArgb() AndroidViewBinding(CalendarViewBinding::inflate) { calendar.setBackgroundColor(color) } }
exception:
Throwing OutOfMemoryError "Failed to allocate a 430032 byte allocation with 297064 free bytes and 290KB until OOM, target footprint 201326592, growth limit 201326592" (VmSize 33280556 kB, recursive case)