Comments (7)
This issue is fixed in the fix-crash
branch but has not been released yet.
You can get the fix using: implementation 'com.github.kizitonwose:CalendarView:7da609173c'
until version 0.2.5
is released.
from calendar.
It seems you are using an older version of the library as this issue has already been fixed. See #29.
Can you confirm that you are on the latest version of the library? Otherwise, update to the latest version and see if the issue persists.
from calendar.
@kizitonwose I'm using the latest version:
implementation 'com.github.kizitonwose:CalendarView:0.2.4'
Cheers,
Federico
from calendar.
Looks like the problem isn't related to the Don't keep activities configuration, but when it's used inside a viewpager within a fragment.
My current layout hierarchy is like follows:
activity layout -> viewpager -> fragment layout -> calendar view
Swiping back and forth between the pages (in my case the calendar in the third page) several times triggers the exception...
from calendar.
As workaround I ended up setting a fixed height for the calendarView (instead using wrap_content) to overcome the TypeCastException.
Not the best solution but at least it doesn't crash...
from calendar.
Version 0.2.5
is released. You can now revert to implementation 'com.github.kizitonwose:CalendarView:0.2.5'
from calendar.
hi @kizitonwose
I am still having this issue. I am using this version implementation 'com.github.kizitonwose:CalendarView:0.3.2'
Fatal Exception: kotlin.TypeCastException: null cannot be cast to non-null type com.kizitonwose.calendarview.ui.DayBinder<com.kizitonwose.calendarview.ui.ViewContainer>
at com.kizitonwose.calendarview.ui.CalendarAdapter.onCreateViewHolder(CalendarAdapter.kt:134)
at com.kizitonwose.calendarview.ui.CalendarAdapter.onCreateViewHolder(CalendarAdapter.kt:29)
at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:7078)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6235)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at androidx.drawerlayout.widget.DrawerLayout.onLayout(DrawerLayout.java:1231)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:1067)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3427)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2894)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1942)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8595)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:988)
at android.view.Choreographer.doCallbacks(Choreographer.java:765)
at android.view.Choreographer.doFrame(Choreographer.java:700)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7156)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
from calendar.
Related Issues (20)
- How make such calendar? (screenshot below) HOT 3
- Multiplatform support HOT 8
- Swiping on Calendar composable results in crash with following exception "java.lang.AbstractMethodError: abstract method "float androidx.compose.foundation.gestures.snapping.SnapLayoutInfoProvider.calculateApproachOffset(float)"" HOT 2
- Horizontal Calendar crashing HOT 5
- Yearly calendar view HOT 2
- Changing `firstDayOfWeek` on `CalendarState` in Compose module doesn't refresh the current month HOT 3
- Displaying Calendar for Weekdays Only HOT 9
- How to set the week titles from Monday to Sunday. HOT 1
- How to do swipe up to change to week view and swipe down to change month view for Compose Calendar HOT 3
- Jerking when scrolling the calendar HOT 4
- Need help to show 5 day of week equally divided in UI HOT 1
- App crashing while using HorizontalCalendar HOT 4
- I am unable to use this library am I doing something wrong Please I need help HOT 1
- support the Chinese?? HOT 1
- Help for using a fork on android studio HOT 6
- How to disable previous swipe functionality in calendar view when showing current month. HOT 2
- Month selection triggers multiple times and with invalid data as well HOT 6
- Exception occurs with material3-window-size-class HOT 1
- Crash using Compose BOM 2024-02-00 HOT 1
- Don't want to show extra adjusted start and end dates in WeekCalender HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calendar.