traex / CalendarListview

Implementation of a calendar in a ListView. One month by row
MIT License
1.48k stars 438 forks source link

app crashing after setting getMaxYear #61

Closed brillmt closed 7 years ago

brillmt commented 7 years ago

I set get Max Year to 2017 and leave the rest the same as the sample.

The app is crashing with error:

java.lang.UnsupportedOperationException: Can't convert value at index 9 to dimension: type=0x12 at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:737) at com.andexert.calendarlistview.library.SimpleMonthView.<init>(SimpleMonthView.java:146) at com.andexert.calendarlistview.library.SimpleMonthAdapter.onCreateViewHolder(SimpleMonthAdapter.java:63) at com.andexert.calendarlistview.library.SimpleMonthAdapter.onCreateViewHolder(SimpleMonthAdapter.java:39) at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6487) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5674) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5557) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5553) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2229) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1556) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1516) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:608) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3693) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3410) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3962) at android.view.View.layout(View.java:18804) at android.view.ViewGroup.layout(ViewGroup.java:5951) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:18804) at android.view.ViewGroup.layout(ViewGroup.java:5951) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:18804) at android.view.ViewGroup.layout(ViewGroup.java:5951) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:18804) at android.view.ViewGroup.layout(ViewGroup.java:5951) 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:887) at android.view.View.layout(View.java:18804) at android.view.ViewGroup.layout(ViewGroup.java:5951) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2655) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2371) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1522) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7098) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927) at android.view.Choreographer.doCallbacks(Choreographer.java:702) at android.view.Choreographer.doFrame(Choreographer.java:638) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6682) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1534) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1424)

brillmt commented 7 years ago

import the library manually. it works now.