Using MaterialAboutCard#MaterialAboutCard(java.lang.CharSequence, MaterialAboutItem...) or MaterialAboutCard#MaterialAboutCard(int, MaterialAboutItem...) would cause below exception.
Because the MaterialAboutCard.id is not been initialized in those 2 constructor methods, and I found that sample also did not test those methods.
So I fix it by setting a default value to the id field.
I did not found any contribute rule so if my commit have any problem, just mention me ;)
java.lang.IllegalArgumentException: Invalid UUID string: NO-UUID
at java.util.UUID.fromString(UUID.java:194)
at com.danielstone.materialaboutlibrary.adapters.MaterialAboutListAdapter.getItemId(MaterialAboutListAdapter.java:102)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6189)
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:22152)
at android.view.ViewGroup.layout(ViewGroup.java:6290)
at androidx.coordinatorlayout.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1213)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:899)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:919)
at android.view.View.layout(View.java:22152)
at android.view.ViewGroup.layout(ViewGroup.java:6290)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:22152)
at android.view.ViewGroup.layout(ViewGroup.java:6290)
at androidx.appcompat.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:530)
at android.view.View.layout(View.java:22152)
at android.view.ViewGroup.layout(ViewGroup.java:6290)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:22152)
at android.view.ViewGroup.layout(ViewGroup.java:6290)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
at android.view.View.layout(View.java:22152)
at android.view.ViewGroup.layout(ViewGroup.java:6290)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:786)
at android.view.View.layout(View.java:22152)
at android.view.ViewGroup.layout(ViewGroup.java:6290)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3356)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2827)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1940)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8073)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1227)
at android.view.Choreographer.doCallbacks(Choreographer.java:1029)
at android.view.Choreographer.doFrame(Choreographer.java:942)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1208)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7707)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Using
MaterialAboutCard#MaterialAboutCard(java.lang.CharSequence, MaterialAboutItem...)
orMaterialAboutCard#MaterialAboutCard(int, MaterialAboutItem...)
would cause below exception.Because the
MaterialAboutCard.id
is not been initialized in those 2 constructor methods, and I found that sample also did not test those methods.So I fix it by setting a default value to the
id
field.I did not found any contribute rule so if my commit have any problem, just mention me ;)