Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

IndexOutOfBoundException #99

Open
lyuku opened this issue Dec 4, 2013 · 1 comment
Open

IndexOutOfBoundException #99

lyuku opened this issue Dec 4, 2013 · 1 comment

Comments

@lyuku
Copy link

lyuku commented Dec 4, 2013

I select Circle Flow Indicator in view flow example program and scroll left, then scroll right again and again. Then the exception occurs.
The following is the exception stack trace,
12-04 12:59:35.768: E/AndroidRuntime(2014): FATAL EXCEPTION: main
12-04 12:59:35.768: E/AndroidRuntime(2014): java.lang.IndexOutOfBoundsException
12-04 12:59:35.768: E/AndroidRuntime(2014): at java.util.LinkedList.get(LinkedList.java:519)
12-04 12:59:35.768: E/AndroidRuntime(2014): at org.taptwo.android.widget.ViewFlow.postViewSwitched(ViewFlow.java:749)
12-04 12:59:35.768: E/AndroidRuntime(2014): at org.taptwo.android.widget.ViewFlow.access$7(ViewFlow.java:705)
12-04 12:59:35.768: E/AndroidRuntime(2014): at org.taptwo.android.widget.ViewFlow$2.run(ViewFlow.java:539)
12-04 12:59:35.768: E/AndroidRuntime(2014): at android.os.Handler.handleCallback(Handler.java:615)
12-04 12:59:35.768: E/AndroidRuntime(2014): at android.os.Handler.dispatchMessage(Handler.java:92)
12-04 12:59:35.768: E/AndroidRuntime(2014): at android.os.Looper.loop(Looper.java:137)
12-04 12:59:35.768: E/AndroidRuntime(2014): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-04 12:59:35.768: E/AndroidRuntime(2014): at java.lang.reflect.Method.invokeNative(Native Method)
12-04 12:59:35.768: E/AndroidRuntime(2014): at java.lang.reflect.Method.invoke(Method.java:511)
12-04 12:59:35.768: E/AndroidRuntime(2014): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-04 12:59:35.768: E/AndroidRuntime(2014): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-04 12:59:35.768: E/AndroidRuntime(2014): at dalvik.system.NativeStart.main(Native Method)
12-04 13:13:52.584: E/Trace(2872): error opening trace file: No such file or directory (2)

@jingyichushi
Copy link

if (mIndicator != null) {
//++start
if (mCurrentBufferIndex < 0)
mCurrentBufferIndex = 0;
if (mCurrentAdapterIndex < 0)
mCurrentAdapterIndex = 0;
//++end
mIndicator.onSwitched(mLoadedViews.get(mCurrentBufferIndex),
mCurrentAdapterIndex);
}
if (mViewSwitchListener != null) {
mViewSwitchListener
.onSwitched(mLoadedViews.get(mCurrentBufferIndex),
mCurrentAdapterIndex);
}
logBuffer();

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

No branches or pull requests

2 participants