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

Error java.lang.NullPointerException #464

Open eduardoyurencb opened 6 years ago

eduardoyurencb commented 6 years ago

I'm using the library in with gradle in the next version:

compile 'com.github.alamkanak:android-week-view:1.2.6'

butn when i using in the layout:

<com.alamkanak.weekview.WeekView android:id="@+id/weekView" android:layout_width="match_parent" android:layout_height="match_parent" app:eventTextColor="@android:color/white" app:textSize="12sp" app:hourHeight="60dp" app:headerColumnPadding="8dp" app:headerColumnTextColor="#8f000000" app:headerRowPadding="12dp" app:columnGap="8dp" app:noOfVisibleDays="3" app:headerRowBackgroundColor="#ffefefef" app:dayBackgroundColor="#05000000" app:todayBackgroundColor="#1848adff" app:headerColumnBackground="#ffffffff"/>

the explorer tell me the next error:

java.lang.NullPointerException at com.alamkanak.weekview.WeekView.drawHeaderRowAndEvents(WeekView.java:613) at com.alamkanak.weekview.WeekView.onDraw_Original(WeekView.java:488) at com.alamkanak.weekview.WeekView.onDraw(WeekView.java) at android.view.View.draw(View.java:17071) at android.view.View.draw(View.java:16979) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:17074) at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:401) at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:548) at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:422) at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:104) at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:154) at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:136) at com.android.tools.idea.rendering.RenderTask.lambda$renderInner$3(RenderTask.java:752) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

DaryaSagi commented 6 years ago

Don't see anything at that line, can you test using https://github.com/Quivr/Android-Week-View ?