Skills:
- π Iβm currently working on Android/Kotlin
- π― Iβm looking to collaborate on Android projects
- π¬ Ask me about Android and Kotlin
- π« How to reach me: [email protected]
Kalendar is a powerful and customizable calendar library for Android applications. It provides a flexible and intuitive way to display and interact with calendars in your app. With Kalendar, you can easily render calendar views, handle date selection, pagination, and range selection, and customize the layout to match your app's design.
Home Page: https://www.himanshoe.com
License: Apache License 2.0
Skills:
Hi, first of all amazing project!
I was tweaking yesterday in a fork I've made of the project and I managed to do exactly what the title says as I cannot see the option to change it on the main branch. I've seen an old issue when this was supposedly solved but I'm not seeing that KalendarKonfig class anymore.
Another aspect I added but haven't test it is the option to change the styling of the BorderStroke for the current day, as it was a bit weird with the default black on a dark background.
Thanks so much, you can take a look on my fork KalendarLocale if you want. Ignore the commits where I try to upload it to Jitpack without success, as I was trying to use this component with the changes for a different project.
Hi there Kalendar Team!!
First of all I wanna say Congrats and thanks for this incredible library.
I Implemented it on my personal project and it works great. However there is a feature that I'd like you to add. I'm talking about the onPreviousClick and onNextClick on KalendarHeader. I'd like to know when user clicks on those options. You could return a lambda to let us to handle the logic.
Thanks in advance guys!
I am developing Android layout using jetpack compose and kotlin. I'm developing a calendar view using the Kalendar library, and I'd like to color in Text only on certain days of the week, Sunday, and all other dates in black. I implemented the code as I wanted, but when I modified the code and ran the app, Kalendar's Text was all black, and I had a problem that when I clicked on a Sunday date, all the Text colors on the calendar turned red. How do I modify the code as I want?
This is code on My Project of Part:
val selectedDate = LocalDate.of(
year.toInt(), month.toInt(), day.toInt()
)
val dayOfWeek = selectedDate.dayOfWeek
val dayColor: Color = when (dayOfWeek.value) {
6 -> Color.Blue
7 -> Color(0xFFF86B6B)
else -> Color.Black }
Kalendar(
currentDay = null,
kalendarType = KalendarType.Firey,
kalendarHeaderTextKonfig = KalendarTextKonfig(
kalendarTextColor = Color.Black, kalendarTextSize = 22.sp
),
kalendarColors = KalendarColors(color = List(12) {
KalendarColor(
backgroundColor = Color.White,
dayBackgroundColor = Color(0xFFFFDAB9),
headerTextColor = Color.Black
)
}),
kalendarDayKonfig = KalendarDayKonfig(
size = 56.dp,
textSize = 14.sp,
textColor = dayColor,
selectedTextColor = dayColor,
borderColor = Color.Transparent
),
daySelectionMode = DaySelectionMode.Single,
onDayClick = { localDate: kotlinx.datetime.LocalDate, kalendarEvents: List<KalendarEvent> ->
year = localDate.year.toString()
month = localDate.monthNumber.toString()
day = localDate.dayOfMonth.toString()
val selectedDate = LocalDate.of(
localDate.year, localDate.monthNumber, localDate.dayOfMonth
)
val dayOfWeek = selectedDate.dayOfWeek
dayString = when (dayOfWeek.value) {
1 -> "μμμΌ"
2 -> "νμμΌ"
3 -> "μμμΌ"
4 -> "λͺ©μμΌ"
5 -> "κΈμμΌ"
6 -> "ν μμΌ"
7 -> "μΌμμΌ"
else -> ""
}
scope.launch {
readTodo(token, year, month, day) {
todoList.clear()
for (i in it!!.data) {
todoList.add(i)
}
}
}
},
headerContent = { month, year ->
Row(
modifier = Modifier.padding(start = 20.dp, bottom = 16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Start
) {
Image(
modifier = Modifier.size(22.dp), painter = painterResource(
id = R.drawable.headertextemogi
), contentDescription = null
)
Spacer(modifier = Modifier.width(4.dp))
Text(
text = if (month.number.toString().length < 2) {
"${year}. 0${month.number}"
} else {
"${year}. ${month.number}"
},
fontSize = 22.sp,
lineHeight = 28.6.sp,
fontWeight = FontWeight(700),
color = Color(0xFF000000)
)
}
},
showLabel = true
)
I think I may be doing something wrong, because for some reason, when I am using the Endlos version of the calendar, I only get the remaining months of the current year, for all years. As you can see from the screenshot, after December, the next year begins from August.
Also, if the week does not have dates in the current month, there looks to be some kind of a padding/margin issue I haven't been able to fix. Any pointers would be appreciated.
Is there a reason why you use kotlinx time and not java time for a compose project? Now you need another dependency to map the whole thing back to java.time. π€
Describe the bug
Try scrolling through the months and it's not smooth.
To Reproduce
Steps to reproduce the behavior:
Just scroll through the months and we can see the lag.
Expected behavior
Can we make scrolling smooth to improve the user experience?
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
Is there a possibility to highlight the current day and a selected day?
Describe the solution you'd like
I would wish if you could highlight the current day and selected day differently.
All the default configurations are marked as internal
. These could be made public so that the defaults can be copied and reused whilst replacing only the properties that need to be replaced. Similar to what the official compose APIs provide. Take ButtonDefaults
for instance.
Currently, to change the textSize
of the day, you are forced to also provide size
, textSize
and textColor
instead of being able to just do something like KalendarDayKonfig.default(textSize = 90.sp)
or KalendarDayKonfig.default().copy(textSize = 90.sp)
It is a great library and thank you for helping me a lot.
It would be great if there was a function to change the background color when configuring the screen.
Instead of reusing kalendarColors.headerTextColor
, It would be more appropriate to allow the user to set this property to a potentially different color.
This is a great library but it could be even better if :
Hi, first of all thank you very much for developing a calendar in Compose as there is no calendar component as with XML.
On the other hand, from what I have seen it doesn't seem to me that you have that included but I comment it to you in case you are planning to develop it or in case it is there and I haven't noticed it.
The idea is that when you pass a series of lists with dates (month and day) in the calendar it appears marked with a dot or in some way as that day there is an event or something, then if you click on that day it shows what the developer wants (which as such if I have seen that you have put that if you click on a day it shows what the developer wants).
I don't know what you think, tell me whatever it is, and of course, thank you very much
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These problems occurred while renovating this repository. View logs.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
Warning
Renovate failed to look up the following dependencies: Failed to look up maven package org.jlleitschuh.gradle:ktlint-gradle
.
Files affected: build.gradle
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/run-detekt.yml
actions/checkout v3
actions/setup-java v3
actions/upload-artifact v3
.github/workflows/run-dokka.yml
actions/checkout v3
actions/setup-java v3
gradle/gradle-build-action v2
JamesIves/github-pages-deploy-action v4.4.2
gradle.properties
settings.gradle
build.gradle
io.gitlab.arturbosch.detekt:detekt-gradle-plugin 1.23.0
org.jlleitschuh.gradle:ktlint-gradle 11.3.2
com.android.application 8.0.2
com.android.library 8.0.2
org.jetbrains.kotlin.android 1.8.21
org.jetbrains.dokka 1.8.10
app/build.gradle
composeOptions 1.4.7
org.jetbrains.kotlinx:kotlinx-datetime 0.4.0
androidx.core:core-ktx 1.8.0
androidx.lifecycle:lifecycle-runtime-ktx 2.3.1
androidx.activity:activity-compose 1.5.1
androidx.compose:compose-bom 2023.05.01
junit:junit 4.13.2
androidx.test.ext:junit 1.1.3
androidx.test.espresso:espresso-core 3.4.0
androidx.compose:compose-bom 2023.05.01
kalendar/gradle.properties
kalendar/build.gradle
com.vanniktech.maven.publish 0.25.2
composeOptions 1.4.7
androidx.core:core-ktx 1.10.1
androidx.appcompat:appcompat 1.6.1
com.google.android.material:material 1.9.0
androidx.compose:compose-bom 2023.05.01
org.jetbrains.kotlinx:kotlinx-datetime 0.4.0
com.slack.lint.compose:compose-lint-checks 1.2.0
junit:junit 4.13.2
androidx.test.ext:junit 1.1.3
androidx.test.espresso:espresso-core 3.4.0
kalendar-endlos/gradle.properties
kalendar-endlos/build.gradle
com.vanniktech.maven.publish 0.25.2
composeOptions 1.4.7
androidx.compose:compose-bom 2023.05.01
androidx.lifecycle:lifecycle-viewmodel-compose 2.6.1
org.jetbrains.kotlinx:kotlinx-datetime 0.4.0
com.slack.lint.compose:compose-lint-checks 1.2.0
androidx.paging:paging-compose 1.0.0-alpha20
androidx.core:core-ktx 1.10.1
androidx.appcompat:appcompat 1.6.1
com.google.android.material:material 1.9.0
junit:junit 4.13.2
androidx.test.ext:junit 1.1.5
androidx.test.espresso:espresso-core 3.5.1
quality/static-check.gradle
gradle/wrapper/gradle-wrapper.properties
gradle 8.0
I wonder that whether use scrolling to change seven days instead of button is betterοΌ
Thanks for this library ! it's very useful, I'm using it in one of my applications, it works well but the problem is that the language of days and months is only English.
It would be great if we could choose the language for example in the constructor of kalendarConfig
.
I tried to implement this feature and it works if possible I can open a PR.
Thanks !
Hi, nice job with this library!
Now that you provide the possibility to fully customize calendar header, I think you should provide a default method to go to previous/next month, because at the moment you can customize the appearance of the header but if you do so you completely lose the possibility of navigating through different months.
I have a question while writing the library.
The dates size aren't dynamic. Even in your gifs, the screen size is not big enough to accommodate all 7 days and it cuts off the extra ones. It would be better if the size dynamically changed to fit the screen
Describe the bug
After creating the release release.yml workflow should be triggered, but not triggered, because of that readme apk download link showing 404 error.
Currently the Oceanic view shows the week view of the Kalendar. There is no indication of what day of the week it is like in the Fiery view ( M T W T F S S )
Perhaps as an option? Show/Hide the Day of the week letters above the date? Example
M T W T F S S
1 2 3 4 5 6 7
In Germany, Spain and I guess many other European countries, the week starts with Monday, not Sunday.
In any case, it would be great to have an option to have this done automatically/manually set locale/manually set the first weekday.
Basically when trying to create a kalendar this error PopUps
java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~xNgNX39TlWzj5MoSWit4Nw==/com.full.crm-p5K3zqTJAzqqk07GPKpHKA==/base.apk)
at com.himanshoe.kalendar.ui.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:87)
at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:120)
at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:118)
at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:63)
I just did this: Kalendar(currentDay = LocalDate(1,1,1), kalendarType = KalendarType.Oceanic)
Full error log
java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~xNgNX39TlWzj5MoSWit4Nw==/com.full.crm-p5K3zqTJAzqqk07GPKpHKA==/base.apk)
at com.himanshoe.kalendar.ui.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:87)
at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:120)
at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:118)
at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:63)
at com.full.crm.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:59)
at com.full.crm.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:56)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:132)
at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:114)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material3.SurfaceKt.Surface-T9BRK9s(Surface.kt:111)
at com.full.crm.ComposableSingletons$MainActivityKt$lambda-2$1.invoke(MainActivity.kt:53)
at com.full.crm.ComposableSingletons$MainActivityKt$lambda-2$1.invoke(MainActivity.kt:52)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material3.TextKt.ProvideTextStyle(Text.kt:360)
at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)
at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material3.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:73)
at com.full.crm.ui.theme.ThemeKt.CRMTheme(Theme.kt:65)
at com.full.crm.ComposableSingletons$MainActivityKt$lambda-3$1.invoke(MainActivity.kt:52)
at com.full.crm.ComposableSingletons$MainActivityKt$lambda-3$1.invoke(MainActivity.kt:51)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:195)
2023-11-01 15:44:29.303 14534-14534 AndroidRuntime com.full.crm E at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:119)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:118)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:110)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:158)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:157)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:157)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:142)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3340)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3273)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:588)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1013)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:520)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:142)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1191)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:133)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:183)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1266)
at android.view.View.dispatchAttachedToWindow(View.java:21980)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3490)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3014)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9305)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348)
at android.view.Choreographer.doCallbacks(Choreographer.java:952)
at android.view.Choreographer.doFrame(Choreographer.java:882)
2023-11-01 15:44:29.304 14534-14534 AndroidRuntime com.full.crm E at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
The latest version of the kalendar library you are currently offering can specify dayBackgroundColor, but you cannot modify the size of the dayBackgroundColor. The circle size provided by the library should be used, so it would be nice if the user could adjust the size arbitrarily so that the user could design the circle size so that the design could be applied accordingly.
Is your feature request related to a problem? Please describe.
When a day is clicked, and an event is returned, if there are multiple events, we only get the first event on that day.
Describe the solution you'd like
Returns a list of all events on that day
Is your feature request related to a problem? Please describe.
When adding a new event Calendar just enable us to change text color.
But sometime we need a sweet virtualization.
If it is possible a nice circle on the bottom date string would be better.
it's not possible to use Persian dates in kalendar?
Describe the bug
Even if the event is set for a specific date, it's showing events on all the dates throughout the calendar,
To Reproduce
Steps to reproduce the behavior:
Describe the bug
The year always stays the same.
To Reproduce
Kalendar(kalendarType = KalendarType.Firey)
Expected behavior
The year should increase/decrease when crossing year boundaries.
Is your feature request related to a problem? Please describe.
Hello, I am testing this library and I saw that a few things have a default value that can't be customizable.
For example, in the KalendarDay
composable, the textSize cannot be overridden because the KalendarFirey
comp that uses KalendarDay
do not pass a value to the textSize
parameter.
The shape is also not customizable and is set to CircleShape.
The text style isn't customizable as well.
Describe the solution you'd like
A way to pass the textSize, the text style and the shape in the KalendarDay.
Describe the bug
Seeing a jank on scroll.
Device
Model : Redmi note 10 pro max
OS : Android 12
Screenshots
https://user-images.githubusercontent.com/9381846/185351273-649269d4-7655-478e-b16b-9cbc19a741c0.mp4
java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~ld90tcC92DCwdfLxq_5ZEg==/com.coachpass.h2oTeam-pl-p1A2QOnPKYKUPzRpTpw==/base.apk)
at com.himanshoe.kalendar.ui.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:87)
at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:120)
Hi, I am using Compose 1.5.1 and I am getting this error for KalendarOceanic.
I love this library. amazing!
I am using this library to develop a todolist app. In the case of the latest version of Android devices, kalendar can be seen well, but in the case of the old version of Android devices, kalendar looks strange.
Line 1 of the table shows the screen when the cell phone is an old device(Samsung Galaxy S9), and line 2 shows the screen when the cell phone is a bit of a recent device(Samsung Galaxy A30).
month-kalendar | week-kalendar |
---|---|
As a user, I would find it really convenient if I could swipe either left/right on the calendar to change the selected date.
If I click on the text with the text "<" and ">", I'm implementing the code to move on to the previous month and the next month.
In addition, if I click text "<" and ">", I'm trying to implement an automatic change in the days that matches the changed month as well as the previous month and the next month.
But I'm asking because it doesn't work out well. How can I modify the code?
var selectedTodo by remember { mutableStateOf<RToDoResponse?>(null) }
val selectedDate = LocalDate.of(
year.toInt(), month.toInt(), day.toInt()
)
var previousSelectedDate by remember { mutableStateOf(selectedDate) }
val today = Clock.System.todayIn(currentSystemDefault())
val displayedMonth = remember { mutableStateOf(today.month) }
val displayedYear = remember { mutableStateOf(today.year) }
val currentMonth = displayedMonth.value
val currentYear = displayedYear.value
val currentMonthIndex = currentMonth.value.minus(1)
Kalendar(
currentDay = null,
kalendarType = KalendarType.Firey,
kalendarHeaderTextKonfig = KalendarTextKonfig(
kalendarTextColor = Color.Black, kalendarTextSize = 22.sp
),
kalendarColors = KalendarColors(color = List(12) {
KalendarColor(
backgroundColor = Color.White,
dayBackgroundColor = Color(0xFFFFDAB9),
headerTextColor = Color.Black
)
}),
daySelectionMode = DaySelectionMode.Single,
headerContent = { month, year ->
Row(
modifier = Modifier.padding(
start = 20.dp,
end = 20.dp,
bottom = 16.dp
),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Start
) {
Image(
modifier = Modifier.size(22.dp), painter = painterResource(
id = R.drawable.headertextemogi
), contentDescription = null
)
Spacer(modifier = Modifier.width(4.dp))
Text(
text = if (currentMonth.value.toString().length < 2) {
"${currentYear}. 0${currentMonth.value}"
} else {
"${currentYear}. ${currentMonth.value}"
},
fontSize = 22.sp,
lineHeight = 28.6.sp,
fontWeight = FontWeight(700),
color = Color(0xFF000000)
)
Spacer(modifier = Modifier.weight(1f))
Text(
modifier = Modifier.clickable {
displayedYear.value -= if (currentMonth == Month.JANUARY) 1 else 0
displayedMonth.value -= 1
},
text = "<",
fontSize = 22.sp,
lineHeight = 28.6.sp,
fontWeight = FontWeight(700),
color = Color(0xFF000000)
)
Spacer(modifier = Modifier.padding(horizontal = 8.dp))
Text(
modifier = Modifier.clickable {
displayedYear.value -= if (currentMonth == Month.JANUARY) 1 else 0
displayedMonth.value -= 1
},
text = ">",
fontSize = 22.sp,
lineHeight = 28.6.sp,
fontWeight = FontWeight(700),
color = Color(0xFF000000)
)
}
},
showLabel = true,
dayContent = { date: kotlinx.datetime.LocalDate ->
val dayOfWeek = calculateDay(
date.dayOfMonth,
displayedMonth.value,
displayedYear.value
).dayOfWeek
Box(
modifier = Modifier
.padding(10.dp)
.size(36.dp)
.background(
color = if (selectedDate == date.toJavaLocalDate()) {
Color(0xFFFFDAB9)
} else if (previousSelectedDate == date.toJavaLocalDate()) {
Color(0xffE9E9E9)
} else {
Color.White
},
CircleShape
)
.pointerInput(Unit) {
detectTapGestures(onPress = {
}
}
)
@RequiresApi(Build.VERSION_CODES.O)
private fun calculateDay(
day: Int,
currentMonth: Month,
currentYear: Int
): kotlinx.datetime.LocalDate {
val monthValue = currentMonth.value.toString().padStart(2, '0')
val dayValue = day.toString().padStart(2, '0')
return "$currentYear-$monthValue-$dayValue".toLocalDate()
}
@RequiresApi(Build.VERSION_CODES.O)
private fun getFirstDayOfMonth(firstDayOfMonth: DayOfWeek) = -(firstDayOfMonth.value).minus(2)
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Is there a way to see previous months in KalendarEndLos ?
Describe the solution you'd like
Maybe I want to check the previous month.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Kalendar(
currentDay = today,
kalendarType = KalendarType.Firey,
modifier = Modifier,
showLabel = true,
events = KalendarEvents(),
kalendarHeaderTextKonfig = null,
kalendarColors = KalendarColors.default(),
kalendarDayKonfig = KalendarDayKonfig.default(),
daySelectionMode = DaySelectionMode.Single,
dayContent = null,
headerContent = null,
onDayClick = { selectedDay, events ->
// Handle day click event
},
onRangeSelected = { selectedRange, events ->
// Handle range selection event
},
onErrorRangeSelected = { error ->
// Handle error
})
This request was resolved for the Kalendar-enloss composable, but would like to have the main Kalendar composable return multiple KalendarEvents
See issue #31 for the resolution
Describe the bug
Crash when using inside bottom navigation tab with appBar
FATAL EXCEPTION: main
Process: com.poovarasan.nakkaq, PID: 20287
java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/data/com.poovarasan.nakkaq/code_cache/.overlay/base.apk/classes.dex)
at com.himanshoe.kalendar.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:55)
at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:64)
at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:32)
at com.poovarasan.nakkaq.pages.ComposableSingletons$CalendarTabKt$lambda-2$1.invoke(CalendarTab.kt:61)
at com.poovarasan.nakkaq.pages.ComposableSingletons$CalendarTabKt$lambda-2$1.invoke(CalendarTab.kt:59)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at com.poovarasan.nakkaq.components.ScaffoldAppBarKt$ScaffoldAppBar$2.invoke(ScaffoldAppBar.kt:20)
at com.poovarasan.nakkaq.components.ScaffoldAppBarKt$ScaffoldAppBar$2.invoke(ScaffoldAppBar.kt:16)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.material.ScaffoldKt$ScaffoldLayout$1$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:322)
at androidx.compose.material.ScaffoldKt$ScaffoldLayout$1$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:320)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:771)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:439)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3330)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3320)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3320)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3255)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:587)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:966)
at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3938)
at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3938)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:519)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcomposeInto(SubcomposeLayout.kt:459)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:432)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:423)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:412)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(SubcomposeLayout.kt:733)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Your personal website seems to be down. It's link is listed in the repo About section (www.himanshoe.com)
Problems compiling after updating the library to version 1.0.0-RC1, here is what I have included in the Gradle and the log that I get back after giving a Build Failed
I have updated the dependency within Gradle (app) to the following version
implementation("com.himanshoe:kalendar:1.0.0-RC1")
Within the Gradle (Project) I have added
mavenCentral()
FAILURE: Build completed with 7 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find sample-app:design-core:unspecified.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
Required by:
project :app > com.himanshoe:kalendar:1.0.0-RC1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find sample-app:design-core:unspecified.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
Required by:
project :app > com.himanshoe:kalendar:1.0.0-RC1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find sample-app:design-core:unspecified.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
Required by:
project :app > com.himanshoe:kalendar:1.0.0-RC1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find sample-app:design-core:unspecified.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
Required by:
project :app > com.himanshoe:kalendar:1.0.0-RC1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
5: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find sample-app:design-core:unspecified.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
Required by:
project :app > com.himanshoe:kalendar:1.0.0-RC1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
6: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find sample-app:design-core:unspecified.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
Required by:
project :app > com.himanshoe:kalendar:1.0.0-RC1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
7: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find sample-app:design-core:unspecified.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
- https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
Required by:
project :app > com.himanshoe:kalendar:1.0.0-RC1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 464ms
Creating UI Kit for Kalendar that will have more clean look and dedicated to Material.
It would be very good to add apk in github action assets on each release, so developers can get a hands on experience on library, without implementing on their project or importing this project
It is possible to put current day circle order color customizable.
Hey! I'd like to feature your library on JetpackCompose.app/ComposeCatalog. Just wanted to give you a heads up!
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.