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

java.lang.IndexOutOfBoundsException: Invalid index 5, size is 5 #152

Open
CY12 opened this issue Feb 5, 2021 · 2 comments
Open

java.lang.IndexOutOfBoundsException: Invalid index 5, size is 5 #152

CY12 opened this issue Feb 5, 2021 · 2 comments

Comments

@CY12
Copy link

CY12 commented Feb 5, 2021

recyclerview 只展示3个图片,3个item;填充transferee是全部的数据;
java.lang.IndexOutOfBoundsException: Invalid index 5, size is 5
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.hitomi.tilibrary.transfer.EmptyThumbState.getPlaceHolder(EmptyThumbState.java:126)
at com.hitomi.tilibrary.transfer.EmptyThumbState.clipAndGetPlaceHolder(EmptyThumbState.java:144)
at com.hitomi.tilibrary.transfer.EmptyThumbState.transferLoad(EmptyThumbState.java:58)
at com.hitomi.tilibrary.transfer.TransferLayout.loadSourceView(TransferLayout.java:248)
at com.hitomi.tilibrary.transfer.TransferLayout.loadSourceViewOffset(TransferLayout.java:237)
at com.hitomi.tilibrary.transfer.TransferChangeListener.onPageSelected(TransferChangeListener.java:55)
at androidx.viewpager.widget.ViewPager.dispatchOnPageSelected(ViewPager.java:1947)
at androidx.viewpager.widget.ViewPager.scrollToItem(ViewPager.java:686)
at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:670)
at androidx.viewpager.widget.ViewPager.onTouchEvent(ViewPager.java:2263)
at android.view.View.dispatchTouchEvent(View.java:9328)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2564)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2250)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2570)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264)
at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2452)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1749)
at android.app.Dialog.dispatchTouchEvent(Dialog.java:872)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2405)
at android.view.View.dispatchPointerEvent(View.java:9548)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4515)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4313)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3823)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3883)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3842)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3990)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3850)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4047)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3823)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3883)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3842)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImp

@wallyperry
Copy link

+1

@ITxiaoguang
Copy link

更多优化请看我这篇!! https://github.com/ITxiaoguang/PhotoViewer

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

3 participants