android-viewflow
android-viewflow copied to clipboard
IndexOutOfBoundException
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)
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();