alamkanak / Android-Week-View

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Apache License 2.0
3.42k stars 1.23k forks source link

App Crashed using Android API 28 with Android OS 9 #511

Open nivritgupta opened 6 years ago

nivritgupta commented 6 years ago

using API level 28 app get crashed when we trying to open the week view or 3 day view here is the logs that I received from crashlytics .

Crash Log

Exception java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed android.graphics.Canvas.checkValidClipOp (Canvas.java:779) android.graphics.Canvas.clipRect (Canvas.java:918) com.alamkanak.weekview.WeekView.drawHeaderRowAndEvents (WeekView.java:826) com.alamkanak.weekview.WeekView.onDraw (WeekView.java:671) android.view.View.draw (View.java:20207) android.view.View.updateDisplayListIfDirty (View.java:19082) android.view.View.draw (View.java:19935) android.view.ViewGroup.drawChild (ViewGroup.java:4333) android.view.ViewGroup.dispatchDraw (ViewGroup.java:4112) android.view.View.draw (View.java:20210) android.view.View.updateDisplayListIfDirty (View.java:19082) android.view.View.draw (View.java:19935) android.view.ViewGroup.drawChild (ViewGroup.java:4333) android.view.ViewGroup.dispatchDraw (ViewGroup.java:4112) android.view.View.updateDisplayListIfDirty (View.java:19073) android.view.View.draw (View.java:19935) android.view.ViewGroup.drawChild (ViewGroup.java:4333) android.view.ViewGroup.dispatchDraw (ViewGroup.java:4112) android.view.View.updateDisplayListIfDirty (View.java:19073) android.view.View.draw (View.java:19935) android.view.ViewGroup.drawChild (ViewGroup.java:4333) android.view.ViewGroup.dispatchDraw (ViewGroup.java:4112) android.view.View.updateDisplayListIfDirty (View.java:19073) android.view.View.draw (View.java:19935) android.view.ViewGroup.drawChild (ViewGroup.java:4333) android.view.ViewGroup.dispatchDraw (ViewGroup.java:4112) android.view.View.updateDisplayListIfDirty (View.java:19073) android.view.View.draw (View.java:19935) android.view.ViewGroup.drawChild (ViewGroup.java:4333) android.view.ViewGroup.dispatchDraw (ViewGroup.java:4112) android.view.View.draw (View.java:20210) com.android.internal.policy.DecorView.draw (DecorView.java:780) android.view.View.updateDisplayListIfDirty (View.java:19082) android.view.ThreadedRenderer.updateViewTreeDisplayList (ThreadedRenderer.java:686) android.view.ThreadedRenderer.updateRootDisplayList (ThreadedRenderer.java:692) android.view.ThreadedRenderer.draw (ThreadedRenderer.java:801) android.view.ViewRootImpl.draw (ViewRootImpl.java:3312) android.view.ViewRootImpl.performDraw (ViewRootImpl.java:3116) android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2485) android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1460) android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7184) android.view.Choreographer$CallbackRecord.run (Choreographer.java:949) android.view.Choreographer.doCallbacks (Choreographer.java:761) android.view.Choreographer.doFrame (Choreographer.java:696) android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:935) android.os.Handler.handleCallback (Handler.java:873) android.os.Handler.dispatchMessage (Handler.java:99) android.os.Looper.loop (Looper.java:193) android.app.ActivityThread.main (ActivityThread.java:6669) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)

Any idea how we can solve this issue ?

Regards

tagmic commented 6 years ago

同样的问题+1

nivritgupta commented 6 years ago

this library is not updated since long time so all the methods related to canvas are deprecated , if anyone face the same crash then compile this library with 26 API only .

thellmund commented 6 years ago

Hi guys, I’ve forked this library and fixed the issue. Take a look here: https://github.com/thellmund/Android-Week-View

Hope it helps 😊

nivritgupta commented 5 years ago

Hi guys, I’ve forked this library and fixed the issue. Take a look here: https://github.com/thellmund/Android-Week-View

Hope it helps 😊

I am checking your code , thanks for the help

qadir227 commented 1 year ago

Hi guys, I’ve forked this library and fixed the issue. Take a look here: https://github.com/thellmund/Android-Week-View

Hope it helps 😊

How to use this library with your code?