Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

示例工程转到Androix PickerLayoutManager运行报错了,有解决办法么? #63

Closed
dearXiaoQ opened this issue Mar 11, 2022 · 0 comments

Comments

@dearXiaoQ
Copy link

java.lang.IndexOutOfBoundsException: Invalid item position 0(0). Item count:0 androidx.recyclerview.widget.RecyclerView{bf14a44 VFED..... ......I. 0,0-0,0 #7f080091 app:id/recycler1}, adapter:com.dingmouren.example.layoutmanagergroup.fragment.PickerFragment$MyAdapter@ef5872d, layout:com.dingmouren.layoutmanagergroup.picker.PickerLayoutManager@7887462, context:com.dingmouren.example.layoutmanagergroup.MainActivity@62ef7a4
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5885)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854)
at com.dingmouren.layoutmanagergroup.picker.PickerLayoutManager.onMeasure(PickerLayoutManager.java:69)
at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3321)
at android.view.View.measure(View.java:24856)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6893)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1204)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:723)
at android.view.View.measure(View.java:24856)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6893)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at androidx.cardview.widget.CardView.onMeasure(CardView.java:260)
at android.view.View.measure(View.java:24856)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:735)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant