wojciechosak / calendar Goto Github PK
View Code? Open in Web Editor NEWKotlin Multiplatform Calendar Library
License: Apache License 2.0
Kotlin Multiplatform Calendar Library
License: Apache License 2.0
Hi!
First of all thank you for this awesome library.
I'm just trying to use a basic example of this library in my Multiplatform project but I'm getting that error.
I'm using Kotlin 2.0.0 and version 1.0.0 of this library.
This is my sample code:
and this is the error thrown when I start the screen:
java.lang.NoSuchMethodError: No static method HorizontalPager-xYaah8o(Landroidx/compose/foundation/pager/PagerState;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/pager/PageSize;IFLandroidx/compose/ui/Alignment$Vertical;Landroidx/compose/foundation/gestures/snapping/SnapFlingBehavior;ZZLkotlin/jvm/functions/Function1;Landroidx/compose/ui/input/nestedscroll/NestedScrollConnection;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;III)V in class Landroidx/compose/foundation/pager/PagerKt; or its super classes (declaration of 'androidx.compose.foundation.pager.PagerKt' appears in /data/app/~~SQRfAPj5kOyhjY82ncDh3A==/br.com.jeancsanchez.igenda-1ihfZ5XZZidtDbit0FsCbg==/base.apk)
at io.wojciechosak.calendar.view.WeekViewKt.WeekView(WeekView.kt:91)
at ui.features.establishment.EstablishmentDetailsViewKt.EstablishmentDetailsView(EstablishmentDetailsView.kt:35)
at ui.AppKt$App$2$1$5.invoke(App.kt:85)
at ui.AppKt$App$2$1$5.invoke(App.kt:81)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:139)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.navigation.compose.NavHostKt$NavHost$22$1.invoke(NavHost.kt:483)
at androidx.navigation.compose.NavHostKt$NavHost$22$1.invoke(NavHost.kt:481)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:250)
at androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider(SaveableStateHolder.kt:84)
at androidx.navigation.compose.NavBackStackEntryProviderKt.SaveableStateProvider(NavBackStackEntryProvider.kt:65)
at androidx.navigation.compose.NavBackStackEntryProviderKt.access$SaveableStateProvider(NavBackStackEntryProvider.kt:1)
at androidx.navigation.compose.NavBackStackEntryProviderKt$LocalOwnersProvider$1.invoke(NavBackStackEntryProvider.kt:52)
at androidx.navigation.compose.NavBackStackEntryProviderKt$LocalOwnersProvider$1.invoke(NavBackStackEntryProvider.kt:51)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:229)
at androidx.navigation.compose.NavBackStackEntryProviderKt.LocalOwnersProvider(NavBackStackEntryProvider.kt:47)
at androidx.navigation.compose.NavHostKt$NavHost$22.invoke(NavHost.kt:481)
at androidx.navigation.compose.NavHostKt$NavHost$22.invoke(NavHost.kt:464)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:139)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$5.invoke(AnimatedContent.kt:755)
at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$5.invoke(AnimatedContent.kt:744)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:118)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.animation.AnimatedVisibilityKt.AnimatedEnterExitImpl(AnimatedVisibility.kt:819)
at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1.invoke(AnimatedContent.kt:726)
at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1.invoke(AnimatedContent.kt:709)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.animation.AnimatedContentKt.AnimatedContent(AnimatedContent.kt:768)
at androidx.navigation.compose.NavHostKt.NavHost(NavHost.kt:441)
at androidx.navigation.compose.NavHostKt$NavHost$24.invoke(Unknown Source:29)
at androidx.navigation.compose.NavHostKt$NavHost$24.invoke(Unknown Source:10)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:192)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2761)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:3052)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3543)
at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3488)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:948)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1196)
at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:130)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:607)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:576)
at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
at android.view.Choreographer.doCallbacks(Choreographer.java:899)
at android.view.Choreographer.doFrame(Choreographer.java:827)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@58579ae, androidx.compose.ui.platform.MotionDurationScaleImpl@f7c034f, StandaloneCoroutine{Cancelling}@ee9aadc, AndroidUiDispatcher@db4f7e5]
I've recently added the library in a KMM project (0.0.8). I've defined the CalendarView, which works perfect and then I realised I need to be able to go next/previous month as well.
I've added the HorizontalCalendarView just like in your sample:
HorizontalCalendarView(startDate = state.selectedDate) { monthOffset ->
CalendarView(
modifier = Modifier.padding(horizontal = standardHorizontalPadding),
day = { calendarState ->
DayView(
date = calendarState.date,
isForAnotherMonth = calendarState.isForPreviousMonth || calendarState.isForNextMonth,
isCurrentSelection = calendarState.date == state.selectedDate,
isDotVisible = false,
onClick = {
sharedViewModel.onEvent(
ShopUiEvent.SelectedDateChanged(
calendarState.date
)
)
},
)
},
dayOfWeekLabel = { dayOfWeek ->
Text(
(RomanianDayOfWeek at dayOfWeek.ordinal)?.name?.substring(
IntRange(
0, 2
)
) ?: "",
fontSize = 12.sp,
textAlign = TextAlign.Center,
)
},
config = rememberCalendarState(
startDate = state.selectedDate,
monthOffset = monthOffset,
showNextMonthDays = true,
showPreviousMonthDays = true,
showHeader = false,
showWeekdays = true,
),
)
}
But I have this following error/crash:
FATAL EXCEPTION: main
Process: x.x, PID: 22821
java.lang.NoSuchMethodError: No static method HorizontalPager-xYaah8o(Landroidx/compose/foundation/pager/PagerState;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/pager/PageSize;IFLandroidx/compose/ui/Alignment$Vertical;Landroidx/compose/foundation/gestures/snapping/SnapFlingBehavior;ZZLkotlin/jvm/functions/Function1;Landroidx/compose/ui/input/nestedscroll/NestedScrollConnection;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;III)V in class Landroidx/compose/foundation/pager/PagerKt; or its super classes (declaration of 'androidx.compose.foundation.pager.PagerKt' appears in /data/app/x.x-QSFiiDGAZAKLV15zDGub2A==/base.apk)
at io.wojciechosak.calendar.view.HorizontalCalendarViewKt.HorizontalCalendarView(HorizontalCalendarView.kt:60)
at presentation.screens.shop.schedule_service.ScheduleServiceScreenKt$ScheduleServiceScreen$2.invoke(ScheduleServiceScreen.kt:91)
at presentation.screens.shop.schedule_service.ScheduleServiceScreenKt$ScheduleServiceScreen$2.invoke(ScheduleServiceScreen.kt:62)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at presentation.GeneralComposablesKt$ScaffoldWithTopBar$4.invoke(GeneralComposables.kt:268)
at presentation.GeneralComposablesKt$ScaffoldWithTopBar$4.invoke(GeneralComposables.kt:266)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:118)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.material3.ScaffoldKt$ScaffoldLayoutWithMeasureFix$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:303)
at androidx.compose.material3.ScaffoldKt$ScaffoldLayoutWithMeasureFix$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:285)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:995)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:478)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:95)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3531)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3458)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:743)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1112)
at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3812)
at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3812)
at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:649)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:635)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcomposeInto(SubcomposeLayout.kt:501)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:473)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:464)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:448)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(SubcomposeLayout.kt:873)
at androidx.compose.material3.ScaffoldKt$ScaffoldLayoutWithMeasureFix$1$1.invoke-0kLqBqw(Scaffold.kt:285)
at androidx.compose.material3.ScaffoldKt$ScaffoldLayoutWithMeasureFix$1$1.invoke(Scaffold.kt:179)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1.measure-3p2s80s(SubcomposeLayout.kt:710)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:135)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:255)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:254)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:488)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:501)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:257)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:113)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1622)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:39)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:623)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:599)
at androidx.compose.foundation.layout.BoxMeasurePolicy.measure-3p2s80s(Box.kt:151)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:135)
at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:646)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:187)
at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:646)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:187)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:255)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:254)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:488)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:501)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:257)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:113)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1622)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:39)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:623)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:599)
at androidx.compose.animation.AnimatedEnterExitMeasurePolicy.measure-3p2s80s(AnimatedVisibility.kt:852)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:135)
at androidx.compose.animation.EnterExitTransitionModifierNode.measure-3p2s80s(EnterExitTransition.kt:1158)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:187)
at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:646)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:187)
at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$1$1.invoke-3p2s80s(AnimatedContent.kt:733)
at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$1$1.invoke(AnimatedContent.kt:732)
at androidx.compose.ui.layout.LayoutModifierImpl.measure-3p2s80s(LayoutModifier.kt:294)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:187)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:255)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:254)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:488)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:501)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:257)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:113)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1622)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:39)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:623)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:599)
at androidx.compose.animation.AnimatedContentMeasurePolicy.measure-3p2s80s(AnimatedContent.kt:787)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:135)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:255)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:254)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2408)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:501)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:257)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:113)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1622)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:39)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:623)
at androidx.compose.ui.node.LayoutNode.remeasure-_Sx5XlM$ui_release(LayoutNode.kt:1194)
at androidx.compose.ui.node.LayoutNode.remeasure-_Sx5XlM$ui_release$default(LayoutNode.kt:1185)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.doRemeasure-sdFAvZA(MeasureAndLayoutDelegate.kt:360)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureAndRelayoutIfNeeded(MeasureAndLayoutDelegate.kt:553)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureAndRelayoutIfNeeded$default(MeasureAndLayoutDelegate.kt:521)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout(MeasureAndLayoutDelegate.kt:381)
at androidx.compose.ui.platform.AndroidComposeView.measureAndLayout(AndroidComposeView.android.kt:1221)
at androidx.compose.ui.node.Owner.measureAndLayout$default(Owner.kt:241)
at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:1474)
at android.view.View.draw(View.java:20376)
at android.view.View.updateDisplayListIfDirty(View.java:19318)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
at android.view.View.updateDisplayListIfDirty(View.java:19277)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
at android.view.View.updateDisplayListIfDirty(View.java:19277)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
at android.view.View.updateDisplayListIfDirty(View.java:19277)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
at android.view.View.updateDisplayListIfDirty(View.java:19277)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:800)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3496)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3283)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2818)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1780)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7827)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Do you know what could go wrong here?
Hi @WojciechOsak .
I just landed on this repo, it looks promising, as calendar is always a hard thing to build.
I just seen that you have a sample for jsMain
, and thought that you may like the idea of building the sample for js
and deploy it to Github pages, that way it can be tested easily for users without needing to build the code.
I have this code on my repository, that does all the work to deploy it to GH Pages:
https://github.com/alorma/Compose-Settings/blob/main/.github/workflows/main.yml#L209-L236
# Deployment job
deploy:
name: Deploy to Github pages
if: ${{ success() }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [ build-sample ]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
- name: Build sample JS - Main
run: ./gradlew jsBrowserDistribution
- name: Upload your page as github pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: composeApp/build/dist/js/productionExecutable/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Maybe you will need this too:
https://github.com/alorma/Compose-Settings/blob/main/.github/workflows/main.yml#L8C1-L12C18
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
Thank you!
Can you please add a feature so that I can add calendar models other than international calendars, like this photo, there are 3 calendar models besides the international calendar, the expectation is that there are 4 indicators in each date box so that users like me can enter other types of calendars, thank you
Got this exception when using the most basic calendar inside my Composable:
I am using this inside a Kotlin Multiplatform project
@OptIn(ExperimentalFoundationApi::class)
@Composable
@Preview
fun TimesheetScreen() {
val startDate = LocalDate.today()
HorizontalCalendarView(startDate = startDate) { monthOffset ->
CalendarView(
config = rememberCalendarState(
startDate = startDate,
monthOffset = monthOffset
)
)
}
}
When item of a day is smallest, then all items don't centering by max width аnd they are located on the right side.
WeekView(
modifier = Modifier.fillMaxWidth()
) { state ->
Column(
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = state.date.daySimpleName(),
)
CalendarDay(
state,
onChange = { date = it },
)
}
}
kotlin.native.internal.IrLinkageError: Function 'HorizontalPager' can not be called: No function found for symbol 'androidx.compose.foundation.pager/HorizontalPager|HorizontalPager(androidx.compose.foundation.pager.PagerState;androidx.compose.ui.Modifier?;androidx.compose.foundation.layout.PaddingValues?;androidx.compose.foundation.pager.PageSize?;kotlin.Int;androidx.compose.ui.unit.Dp;androidx.compose.ui.Alignment.Vertical?;androidx.compose.foundation.gestures.snapping.SnapFlingBehavior?;kotlin.Boolean;kotlin.Boolean;kotlin.Function1<kotlin.Int,kotlin.Any>?;androidx.compose.ui.input.nestedscroll.NestedScrollConnection?;kotlin.Function4<androidx.compose.foundation.pager.PagerScope,kotlin.Int,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int;kotlin.Int){}[0]'
Uncaught Kotlin exception: at 0 UrineTracker 0x1012aefff kfun:kotlin.Throwable#<init>(kotlin.String?){} + 119
at 1 UrineTracker 0x1012a83cf kfun:kotlin.Error#<init>(kotlin.String?){} + 115
at 2 UrineTracker 0x1012e05a3 kfun:kotlin.native.internal.IrLinkageError#<init>(kotlin.String?){} + 115
at 3 UrineTracker 0x1012e065b kfun:kotlin.native.internal#ThrowIrLinkageError(kotlin.String?){}kotlin.Nothing + 163
at 4 UrineTracker 0x102790a93 kfun:io.wojciechosak.calendar.view#HorizontalCalendarView(kotlinx.datetime.LocalDate;androidx.compose.foundation.pager.PagerState?;androidx.compose.ui.Modifier?;androidx.compose.foundation.pager.PageSize?;kotlin.Int;androidx.compose.foundation.layout.PaddingValues?;io.wojciechosak.calendar.animation.CalendarAnimator?;kotlin.Function3<kotlin.Int,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>?;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){} + 1775
at 5 UrineTracker 0x100d4745f kfun:com.alexey.urinetracker.calendar#CalendarScreen(com.alexey.urinetracker.calendar.CalendarComponent;androidx.compose.runtime.Composer?;kotlin.Int){} + 699
at 6 UrineTracker 0x100d72823 kfun:com.alexey.urinetracker.root.ComposableSingletons$RootScreenKt.<init>$lambda$3#internal + 883
at 7 UrineTracker 0x100d73643 kfun:com.alexey.urinetracker.root.ComposableSingletons$RootScreenKt.$<init>$lambda$3$FUNCTION_REFERENCE$7.invoke#internal + 123
at 8 UrineTracker 0x100d7371b kfun:com.alexey.urinetracker.root.ComposableSingletons$RootScreenKt.$<init>$lambda$3$FUNCTION_REFERENCE$7.$<bridge-UNNNNB>invoke(com.arkivanov.decompose.Child.Created<kotlin.Any,com.alexey.urinetracker.root.RootComponent.Child>;androidx.compose.runtime.Composer;kotlin.Int){}#internal + 195
at 9 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 10 UrineTracker 0x1016b2913 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 635
at 11 UrineTracker 0x1016c0bab kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNNB>invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 199
at 12 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 13 UrineTracker 0x1023ee153 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.Children$lambda$1$lambda$0#internal + 451
at 14 UrineTracker 0x1023ef817 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.$Children$lambda$1$lambda$0$FUNCTION_REFERENCE$5.invoke#internal + 119
at 15 UrineTracker 0x1023ef96b kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.$Children$lambda$1$lambda$0$FUNCTION_REFERENCE$5.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 159
at 16 UrineTracker 0x1013d7867 kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 115
at 17 UrineTracker 0x1016b25b7 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 603
at 18 UrineTracker 0x1016c0aaf kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 163
at 19 UrineTracker 0x1013d7867 kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 115
at 20 UrineTracker 0x1015b640f kfun:androidx.compose.runtime#CompositionLocalProvider(androidx.compose.runtime.ProvidedValue<*>;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 595
at 21 UrineTracker 0x101e3246f kfun:androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider#internal + 2251
at 22 UrineTracker 0x101e36d5f kfun:androidx.compose.runtime.saveable.SaveableStateHolder#SaveableStateProvider(kotlin.Any;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){}-trampoline + 123
at 23 UrineTracker 0x1023ee4f3 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.Children$lambda$1#internal + 811
at 24 UrineTracker 0x1023eed27 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.$Children$lambda$1$FUNCTION_REFERENCE$0.invoke#internal + 147
at 25 UrineTracker 0x1023eee9f kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.$Children$lambda$1$FUNCTION_REFERENCE$0.$<bridge-UNNNNB>invoke(com.arkivanov.decompose.Child.Created<1:0,1:1>;androidx.compose.runtime.Composer;kotlin.Int){}#internal + 195
at 26 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 27 UrineTracker 0x1016b2913 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 635
at 28 UrineTracker 0x1016c0bab kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNNB>invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 199
at 29 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 30 UrineTracker 0x1023fc28b kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.SimpleStackAnimation.Child$lambda$0#internal + 3539
at 31 UrineTracker 0x1023fc567 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.SimpleStackAnimation.$Child$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 147
at 32 UrineTracker 0x1023fc6df kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.SimpleStackAnimation.$Child$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNNNNB>invoke(androidx.compose.ui.Modifier;androidx.compose.runtime.Composer;kotlin.Int){}#internal + 195
at 33 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 34 UrineTracker 0x1016b2913 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 635
at 35 UrineTracker 0x1016c0bab kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNNB>invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 199
at 36 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 37 UrineTracker 0x1023fe447 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.PlusStackAnimator.invoke$lambda$3$lambda$2#internal + 655
at 38 UrineTracker 0x1023ff5e7 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.PlusStackAnimator.$invoke$lambda$3$lambda$2$FUNCTION_REFERENCE$4.invoke#internal + 147
at 39 UrineTracker 0x1023ff75f kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.PlusStackAnimator.$invoke$lambda$3$lambda$2$FUNCTION_REFERENCE$4.$<bridge-UNNNNB>invoke(androidx.compose.ui.Modifier;androidx.compose.runtime.Composer;kotlin.Int){}#internal + 195
at 40 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 41 UrineTracker 0x1016b2913 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 635
at 42 UrineTracker 0x1016c0bab kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNNB>invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 199
at 43 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 44 UrineTracker 0x1023fa5c7 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.scale$lambda$0#internal + 923
at 45 UrineTracker 0x1023fa6fb kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.$scale$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 191
at 46 UrineTracker 0x1023fa8a3 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.$scale$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNNBNNNB>invoke(kotlin.Float;com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.Direction;kotlin.Function3<androidx.compose.ui.Modifier,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer;kotlin.Int){}#internal + 279
at 47 UrineTracker 0x1013e7d5f kfun:kotlin.Function5#invoke(1:0;1:1;1:2;1:3;1:4){}1:5-trampoline + 139
at 48 UrineTracker 0x1016b308f kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(kotlin.Any?;kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 715
at 49 UrineTracker 0x1016c0e13 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNNNNB>invoke(kotlin.Any?;kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(kotlin.Any?;kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 275
at 50 UrineTracker 0x1013e7d5f kfun:kotlin.Function5#invoke(1:0;1:1;1:2;1:3;1:4){}1:5-trampoline + 139
at 51 UrineTracker 0x1023f592f kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.DefaultStackAnimator#invoke(com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.Direction;kotlin.Boolean;kotlin.Function0<kotlin.Unit>;kotlin.Function3<androidx.compose.ui.Modifier,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 2967
at 52 UrineTracker 0x1024015ff kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.StackAnimator#invoke(com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.Direction;kotlin.Boolean;kotlin.Function0<kotlin.Unit>;kotlin.Function3<androidx.compose.ui.Modifier,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){}-trampoline + 143
at 53 UrineTracker 0x1023feb07 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.PlusStackAnimator.invoke$lambda$3#internal + 1611
at 54 UrineTracker 0x1023feeeb kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.PlusStackAnimator.$invoke$lambda$3$FUNCTION_REFERENCE$1.invoke#internal + 171
at 55 UrineTracker 0x1023ff103 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.PlusStackAnimator.$invoke$lambda$3$FUNCTION_REFERENCE$1.$<bridge-UNNNNB>invoke(androidx.compose.ui.Modifier;androidx.compose.runtime.Composer;kotlin.Int){}#internal + 195
at 56 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 57 UrineTracker 0x1016b2913 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 635
at 58 UrineTracker 0x1016c0bab kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNNB>invoke(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 199
at 59 UrineTracker 0x1013d795b kfun:kotlin.Function3#invoke(1:0;1:1;1:2){}1:3-trampoline + 123
at 60 UrineTracker 0x1023f9c37 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.fade$lambda$0#internal + 851
at 61 UrineTracker 0x1023f9d67 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.$fade$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 187
at 62 UrineTracker 0x1023f9ef7 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.$fade$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNNBNNNB>invoke(kotlin.Float;com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.Direction;kotlin.Function3<androidx.compose.ui.Modifier,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer;kotlin.Int){}#internal + 279
at 63 UrineTracker 0x1013e7d5f kfun:kotlin.Function5#invoke(1:0;1:1;1:2;1:3;1:4){}1:5-trampoline + 139
at 64 UrineTracker 0x1016b308f kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(kotlin.Any?;kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 715
at 65 UrineTracker 0x1016c0e13 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNNNNB>invoke(kotlin.Any?;kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(kotlin.Any?;kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 275
at 66 UrineTracker 0x1013e7d5f kfun:kotlin.Function5#invoke(1:0;1:1;1:2;1:3;1:4){}1:5-trampoline + 139
at 67 UrineTracker 0x1023f592f kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.DefaultStackAnimator#invoke(com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.Direction;kotlin.Boolean;kotlin.Function0<kotlin.Unit>;kotlin.Function3<androidx.compose.ui.Modifier,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 2967
at 68 UrineTracker 0x1024015ff kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.StackAnimator#invoke(com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.Direction;kotlin.Boolean;kotlin.Function0<kotlin.Unit>;kotlin.Function3<androidx.compose.ui.Modifier,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){}-trampoline + 143
at 69 UrineTracker 0x1023fdcdb kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.PlusStackAnimator.invoke#internal + 3131
at 70 UrineTracker 0x1024015ff kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.StackAnimator#invoke(com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.Direction;kotlin.Boolean;kotlin.Function0<kotlin.Unit>;kotlin.Function3<androidx.compose.ui.Modifier,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){}-trampoline + 143
at 71 UrineTracker 0x1023fb35f kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.SimpleStackAnimation#Child(com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.AbstractStackAnimation.AnimationItem<1:0,1:1>;kotlin.Function0<kotlin.Unit>;kotlin.Function3<com.arkivanov.decompose.Child.Created<1:0,1:1>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 2427
at 72 UrineTracker 0x102401277 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.AbstractStackAnimation#Child(com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.AbstractStackAnimation.AnimationItem<1:0,1:1>;kotlin.Function0<kotlin.Unit>;kotlin.Function3<com.arkivanov.decompose.Child.Created<1:0,1:1>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){}-trampoline + 91
at 73 UrineTracker 0x1023f1423 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.AbstractStackAnimation#invoke(com.arkivanov.decompose.router.stack.ChildStack<1:0,1:1>;androidx.compose.ui.Modifier;kotlin.Function3<com.arkivanov.decompose.Child.Created<1:0,1:1>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 6587
at 74 UrineTracker 0x1024011c3 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.StackAnimation#invoke(com.arkivanov.decompose.router.stack.ChildStack<1:0,1:1>;androidx.compose.ui.Modifier;kotlin.Function3<com.arkivanov.decompose.Child.Created<1:0,1:1>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){}-trampoline + 131
at 75 UrineTracker 0x1023ec9f7 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack#Children(com.arkivanov.decompose.router.stack.ChildStack<0:0,0:1>;androidx.compose.ui.Modifier?;com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.StackAnimation<0:0,0:1>?;kotlin.Function3<com.arkivanov.decompose.Child.Created<0:0,0:1>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){0§<kotlin.Any>;1§<kotlin.Any>} + 2163
at 76 UrineTracker 0x1023ed27b kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack#Children(com.arkivanov.decompose.value.Value<com.arkivanov.decompose.router.stack.ChildStack<0:0,0:1>>;androidx.compose.ui.Modifier?;com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.StackAnimation<0:0,0:1>?;kotlin.Function3<com.arkivanov.decompose.Child.Created<0:0,0:1>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){0§<kotlin.Any>;1§<kotlin.Any>} + 1839
at 77 UrineTracker 0x1023ee887 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.Children$lambda$3#internal + 379
at 78 UrineTracker 0x1023ef1f7 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.$Children$lambda$3$FUNCTION_REFERENCE$2.invoke#internal + 135
at 79 UrineTracker 0x1023ef3d7 kfun:com.arkivanov.decompose.extensions.compose.jetbrains.stack.$Children$lambda$3$FUNCTION_REFERENCE$2.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer?;kotlin.Int){}#internal + 159
at 80 UrineTracker 0x1013d7867 kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 115
at 81 UrineTracker 0x1015c37ef kfun:androidx.compose.runtime.RecomposeScopeImpl#compose(androidx.compose.runtime.Composer){} + 751
at 82 UrineTracker 0x10158f83f kfun:androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd#internal + 1395
at 83 UrineTracker 0x101592243 kfun:androidx.compose.runtime.ComposerImpl#skipCurrentGroup(){} + 1915
at 84 UrineTracker 0x101597257 kfun:androidx.compose.runtime.ComposerImpl.doCompose#internal + 2935
at 85 UrineTracker 0x10159666b kfun:androidx.compose.runtime.ComposerImpl#recompose(androidx.compose.runtime.collection.ScopeMap<androidx.compose.runtime.RecomposeScopeImpl,kotlin.Any>){}kotlin.Boolean + 483
at 86 UrineTracker 0x1015ab03b kfun:androidx.compose.runtime.CompositionImpl#recompose(){}kotlin.Boolean + 811
at 87 UrineTracker 0x1016ca4d3 kfun:androidx.compose.runtime.ControlledComposition#recompose(){}kotlin.Boolean-trampoline + 91
at 88 UrineTracker 0x1015cdccf kfun:androidx.compose.runtime.Recomposer.performRecompose#internal + 1363
at 89 UrineTracker 0x1015d4aef kfun:androidx.compose.runtime.Recomposer.runRecomposeAndApplyChanges$lambda$4$lambda$3#internal + 2475
at 90 UrineTracker 0x1015da3bb kfun:androidx.compose.runtime.Recomposer.$runRecomposeAndApplyChanges$lambda$4$lambda$3$FUNCTION_REFERENCE$13.invoke#internal + 135
at 91 UrineTracker 0x1015da633 kfun:androidx.compose.runtime.Recomposer.$runRecomposeAndApplyChanges$lambda$4$lambda$3$FUNCTION_REFERENCE$13.$<bridge-UNNB>invoke(kotlin.Long){}#internal + 123
at 92 UrineTracker 0x1013d255f kfun:kotlin.Function1#invoke(1:0){}1:1-trampoline + 107
at 93 UrineTracker 0x1015791ef kfun:androidx.compose.runtime.BroadcastFrameClock.FrameAwaiter.resume#internal + 439
at 94 UrineTracker 0x101579a0f kfun:androidx.compose.runtime.BroadcastFrameClock#sendFrame(kotlin.Long){} + 555
at 95 UrineTracker 0x1020a3dcb kfun:androidx.compose.ui.scene.BaseComposeScene#render(androidx.compose.ui.graphics.Canvas;kotlin.Long){} + 1275
at 96 UrineTracker 0x10217eb2f kfun:androidx.compose.ui.scene.ComposeScene#render(androidx.compose.ui.graphics.Canvas;kotlin.Long){}-trampoline + 107
at 97 UrineTracker 0x1020ffc5f kfun:androidx.compose.ui.scene.RenderingUIViewDelegateImpl.onRender#internal + 515
at 98 UrineTracker 0x1017957a3 kfun:org.jetbrains.skiko.SkikoRenderDelegate#onRender(org.jetbrains.skia.Canvas;kotlin.Int;kotlin.Int;kotlin.Long){}-trampoline + 123
at 99 UrineTracker 0x10215c2c7 kfun:androidx.compose.ui.window.RenderingUIView.object-1.render#internal + 299
at 100 UrineTracker 0x102189b93 kfun:androidx.compose.ui.window.MetalRedrawerCallbacks#render(org.jetbrains.skia.Canvas;kotlin.Double){}-trampoline + 107
at 101 UrineTracker 0x102152af3 kfun:androidx.compose.ui.window.MetalRedrawer.draw#internal + 4167
at 102 UrineTracker 0x102155497 kfun:androidx.compose.ui.window.MetalRedrawer.<init>$lambda$0#internal + 435
at 103 UrineTracker 0x1021575e3 kfun:androidx.compose.ui.window.MetalRedrawer.$<init>$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 71
at 104 UrineTracker 0x1021576b3 kfun:androidx.compose.ui.window.MetalRedrawer.$<init>$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNN>invoke(){}#internal + 71
at 105 UrineTracker 0x1013d3ac7 kfun:kotlin.Function0#invoke(){}1:0-trampoline + 99
at 106 UrineTracker 0x1021583e7 kfun:androidx.compose.ui.window.DisplayLinkProxy.handleDisplayLinkTick#internal + 151
at 107 UrineTracker 0x10215849b kfun:androidx.compose.ui.window.DisplayLinkProxy.$imp:handleDisplayLinkTick#internal + 143
at 108 QuartzCore 0x18a02366b _ZN2CA7Display15DisplayLinkItem9dispatch_ERNS_8SignPost8IntervalILNS2_11CAEventCodeE835322056EEE + 43
at 109 QuartzCore 0x18a01fe43 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 807
at 110 QuartzCore 0x18a120c97 _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 335
at 111 CoreFoundation 0x1803d8a1f __CFMachPortPerform + 171
at 112 CoreFoundation 0x18040f587 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 55
at 113 CoreFoundation 0x18040eb57 __CFRunLoopDoSource1 + 495
at 114 CoreFoundation 0x180409167 __CFRunLoopRun + 2175
at 115 CoreFoundation 0x1804084d3 CFRunLoopRunSpecific + 571
at 116 GraphicsServices 0x18ef2aae3 GSEventRunModal + 159
at 117 UIKitCore 0x1853d0a27 -[UIApplication _run] + 867
at 118 UIKitCore 0x1853d46af UIApplicationMain + 123
at 119 UIKitCore 0x1848736a7 __swift_destroy_boxed_opaque_existential_1Tm + 10047
at 120 UrineTracker 0x100d34f5b $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 119
at 121 UrineTracker 0x100d34ed3 $s12UrineTracker11AppDelegateC5$mainyyFZ + 43
at 122 UrineTracker 0x100d3514f main + 27 (/Users/alexeypushkarev/AndroidStudioProjects/UrineTracker/iosApp/iosApp/iosApp.swift:<unknown>)
at 123 dyld 0x1058b1543 0x0 + 4387968323
at 124 ??? 0x10525e0df 0x0 + 4381335775
at 125 ??? 0x650e7fffffffffff 0x0 + 7281898384993026047
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.BroadcastFrameClock@6540560, StandaloneCoroutine{Cancelling}@6500c78, FlushCoroutineDispatcher@d7141b0]
at 0 UrineTracker 0x1012aefff kfun:kotlin.Throwable#<init>(kotlin.String?){} + 119
at 1 UrineTracker 0x1012a8567 kfun:kotlin.Exception#<init>(kotlin.String?){} + 115
at 2 UrineTracker 0x1012a8787 kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 115
at 3 UrineTracker 0x1015678e3 kfun:kotlinx.coroutines.internal.DiagnosticCoroutineContextException#<init>(kotlin.coroutines.CoroutineContext){} + 167
at 4 UrineTracker 0x10153c32b kfun:kotlinx.coroutines.internal#handleUncaughtCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 647
at 5 UrineTracker 0x1014e09bf kfun:kotlinx.coroutines#handleCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 515
at 6 UrineTracker 0x1014d4863 kfun:kotlinx.coroutines.StandaloneCoroutine.handleJobException#internal + 167
at 7 UrineTracker 0x10156f8ef kfun:kotlinx.coroutines.JobSupport#handleJobException(kotlin.Throwable){}kotlin.Boolean-trampoline + 59
at 8 UrineTracker 0x1014eb173 kfun:kotlinx.coroutines.JobSupport.finalizeFinishingState#internal + 1135
at 9 UrineTracker 0x1014f3567 kfun:kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath#internal + 1983
at 10 UrineTracker 0x1014f2d6f kfun:kotlinx.coroutines.JobSupport.tryMakeCompleting#internal + 755
at 11 UrineTracker 0x1014f289f kfun:kotlinx.coroutines.JobSupport#makeCompletingOnce(kotlin.Any?){}kotlin.Any? + 379
at 12 UrineTracker 0x1014d27f3 kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 211
at 13 UrineTracker 0x1013d7263 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 14 UrineTracker 0x1012b4063 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 1163
at 15 UrineTracker 0x1013d7263 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 16 UrineTracker 0x1015606f7 kfun:kotlinx.coroutines.UndispatchedCoroutine#afterResume(kotlin.Any?){} + 243
at 17 UrineTracker 0x10156b2e7 kfun:kotlinx.coroutines.AbstractCoroutine#afterResume(kotlin.Any?){}-trampoline + 59
at 18 UrineTracker 0x1014d284f kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 303
at 19 UrineTracker 0x1013d7263 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 20 UrineTracker 0x1012b4063 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 1163
at 21 UrineTracker 0x1013d7263 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 22 UrineTracker 0x101546e6b kfun:kotlinx.coroutines.internal.ScopeCoroutine#afterResume(kotlin.Any?){} + 243
at 23 UrineTracker 0x10156b2e7 kfun:kotlinx.coroutines.AbstractCoroutine#afterResume(kotlin.Any?){}-trampoline + 59
at 24 UrineTracker 0x1014d284f kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 303
at 25 UrineTracker 0x1013d7263 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 26 UrineTracker 0x1012b4063 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 1163
at 27 UrineTracker 0x1013d7263 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 28 UrineTracker 0x10153ffc3 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1691
at 29 UrineTracker 0x10156e15b kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 91
at 30 UrineTracker 0x102092a5f kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.dispatch$lambda$1$lambda$0#internal + 411
at 31 UrineTracker 0x102094093 kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.$dispatch$lambda$1$lambda$0$FUNCTION_REFERENCE$4.invoke#internal + 75
at 32 UrineTracker 0x10209418f kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.$dispatch$lambda$1$lambda$0$FUNCTION_REFERENCE$4.$<bridge-UNN>invoke(){}#internal + 71
at 33 UrineTracker 0x1013d3ac7 kfun:kotlin.Function0#invoke(){}1:0-trampoline + 99
at 34 UrineTracker 0x1020923e7 kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.performRun#internal + 303
at 35 UrineTracker 0x102092be7 kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.dispatch$lambda$1#internal + 239
at 36 UrineTracker 0x102093adf kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.$dispatch$lambda$1$FUNCTION_REFERENCE$0.invoke#internal + 139
at 37 UrineTracker 0x1013d7867 kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 115
at 38 UrineTracker 0x1012b7653 kfun:kotlin.coroutines.intrinsics.object-4.invokeSuspend#internal + 731
at 39 UrineTracker 0x1013d7183 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any?-trampoline + 67
at 40 UrineTracker 0x1012b3e47 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 623
at 41 UrineTracker 0x1013d7263 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 42 UrineTracker 0x10154007f kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1879
at 43 UrineTracker 0x10156e15b kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 91
at 44 UrineTracker 0x101569dd3 kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda$0#internal + 67
at 45 UrineTracker 0x10156a04f kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1.invoke#internal + 71
at 46 UrineTracker 0x10156a11f kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1.$<bridge-UNN>invoke(){}#internal + 71
at 47 UrineTracker 0x1013d3ac7 kfun:kotlin.Function0#invoke(){}1:0-trampoline + 99
at 48 UrineTracker 0x10156b063 _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f72652f6f70742f6275696c644167656e742f776f726b2f343465633665383530643563363366302f6b6f746c696e782d636f726f7574696e65732d636f72652f6e617469766544617277696e2f7372632f44697370617463686572732e6b74_knbridge13 + 191
at 49 libdispatch.dylib 0x180170103 _dispatch_call_block_and_release + 23
at 50 libdispatch.dylib 0x180171977 _dispatch_client_callout + 15
at 51 libdispatch.dylib 0x1801807c7 _dispatch_main_queue_drain + 1275
at 52 libdispatch.dylib 0x1801802bb _dispatch_main_queue_callback_4CF + 39
at 53 CoreFoundation 0x18040e95f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 11
at 54 CoreFoundation 0x180409077 __CFRunLoopRun + 1935
at 55 CoreFoundation 0x1804084d3 CFRunLoopRunSpecific + 571
Unable to do gestures on desktop, would be nice to have arrows for selecting year
On desktop, in vertical view we can use scroll wheel with mouse to go to previous/next pages for year selection but we scroll wheel does not work for horizontal view.
I use kotlin 2.0.0 (+ tested on 1.9.23 same error), compose multiplatform 1.6.10, and last version of calendar 1.0.1
On android, desktop and js all working pretty fine
All error code
Task :composeApp:linkDebugFrameworkIosSimulatorArm64
Failed to load native library:libjansi.jnilib. The native library file at /user/.gradle/native/jansi/1.18/osx/libjansi.jnilib is not executable, make sure that the directory is mounted on a partition without the noexec flag, or set the jansi.tmpdir system property to point to a proper location. osinfo: Mac/arm64
java.lang.UnsatisfiedLinkError: Can't load library: /user/.gradle/native/jansi/1.18/osx/libjansi.jnilib
error: Compilation failed: Exception during generating code for following declaration:
Inside: FILE fqName:com.KopohGames.Scheduler.ui.Schedule fileName:/repo/composeApp/src/commonMain/kotlin/com/KopohGames/Scheduler/ui/Schedule/ScheduleScreen.kt
Inside: CLASS CLASS name:ScheduleScreen modality:FINAL visibility:public superTypes:[cafe.adriel.voyager.core.screen.Screen; org.koin.core.component.KoinComponent]
Inside: FUN LOCAL_FUNCTION_FOR_LAMBDA name:Content$lambda$53$lambda$38 visibility:private modality:FINAL <> ($daysOfWeek:kotlin.collections.List<kotlin.String>, state:@[ParameterName(name = "dayState")] io.wojciechosak.calendar.config.DayState, $composer:androidx.compose.runtime.Composer?, $changed:kotlin.Int) returnType:kotlin.Unit
Inside: FILE fqName:androidx.compose.foundation.layout fileName:/opt/buildAgent/work/8a20760945d0aeba/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Column.kt
Inside: FILE fqName:androidx.compose.ui.layout fileName:/opt/buildAgent/work/8a20760945d0aeba/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Layout.kt
Inside: FILE fqName:androidx.compose.runtime fileName:/opt/buildAgent/work/8a20760945d0aeba/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composables.kt
Inside: FILE fqName:androidx.compose.foundation.layout fileName:/opt/buildAgent/work/8a20760945d0aeba/compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Column.kt
// FILE: ScheduleScreen.kt
// path: /repo/composeApp/src/commonMain/kotlin/com/KopohGames/Scheduler/ui/Schedule/ScheduleScreen.kt
package com.KopohGames.Scheduler.ui.Schedule
Through trial and error, I identified a problem in passing the state in the Webview component, because if I copy the DayState exactly, and just redefine the values via
data class TESTDAYState(
val date: LocalDate,
val isActiveDay: Boolean = false,
val isForPreviousMonth: Boolean = false,
val isForNextMonth: Boolean = false,
val enabled: Boolean = true
)
val DayState: TESTDAYState = TESTDAYState(
state.date,
state.isActiveDay,
state.isForNextMonth,
state.isForPreviousMonth,
state.enabled
)
This code is from this library repo (I just change data class and colors to MaterialTheme)
@Composable
fun WeekViewDay(
modifier: Modifier = Modifier,
state: TESTDAYState,
onClick: (TESTDAYState) -> Unit = {}
) {
OutlinedButton(
onClick = { onClick(state) },
modifier = modifier,
shape = RoundedCornerShape(50.dp),
border = BorderStroke(1.dp, Color.Transparent),
contentPadding = PaddingValues(0.dp),
interactionSource = MutableInteractionSource(),
enabled = state.enabled,
colors =
ButtonDefaults.outlinedButtonColors(
contentColor =
if (state.isForPreviousMonth || state.isForNextMonth) {
MaterialTheme.colorScheme.tertiary
} else {
if (state.isActiveDay) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onTertiary
},
),
) {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
Text(
"${state.date.dayOfMonth}",
fontSize = 20.sp,
textAlign = TextAlign.Center,
)
}
}
}
To display my weekview I use example from docs
WeekView { state ->
val DayState: TESTDAYState = TESTDAYState(
state.date,
state.isActiveDay,
state.isForNextMonth,
state.isForPreviousMonth,
state.enabled
)
Column(horizontalAlignment = Alignment.CenterHorizontally) {
Text(daysOfWeek[state.date.dayOfWeek.isoDayNumber - 1])
WeekViewDay(
state = DayState,
modifier = Modifier.width(58.dp)
)
}
}
Then everything starts to build, but the choice of the day and its background do not work (with this it is clear, the values are simply not returned back to the function above)
HI @WojciechOsak, can we create our own layout? I've checked the sample project to figure out how to achieve this. I want to keep the functionality which you implemented but would like to have my own ui design
I want to achieve similar design
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.