i am having listview in my view pager and i have used TitlePageIndicator. Everything seems to be working fine but randomly it crashes due IndexOutOfBound exception. I am not sure what is the cause for it. Below i have attached the stacktrace of it. Also i found this link and its mentioned that this has been fixed in 2.1.0. But i am using the 2.3.1 version.
`
> 07-31 15:32:10.242: W/System.err(6720): java.lang.IndexOutOfBoundsException: Invalid index 4, size is 1
07-31 15:32:10.247: W/System.err(6720): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
07-31 15:32:10.247: W/System.err(6720): at java.util.ArrayList.get(ArrayList.java:304)
07-31 15:32:10.247: W/System.err(6720): at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:225)
07-31 15:32:10.247: W/System.err(6720): at android.widget.AbsListView.obtainView(AbsListView.java:2452)
07-31 15:32:10.247: W/System.err(6720): at android.widget.ListView.makeAndAddView(ListView.java:1775)
07-31 15:32:10.247: W/System.err(6720): at android.widget.ListView.fillDown(ListView.java:678)
07-31 15:32:10.247: W/System.err(6720): at android.widget.ListView.fillSpecific(ListView.java:1336)
07-31 15:32:10.247: W/System.err(6720): at android.widget.ListView.layoutChildren(ListView.java:1606)
07-31 15:32:10.247: W/System.err(6720): at android.widget.AbsListView.onLayout(AbsListView.java:2303)
07-31 15:32:10.247: W/System.err(6720): at android.view.View.layout(View.java:14063)
07-31 15:32:10.247: W/System.err(6720): at android.view.ViewGroup.layout(ViewGroup.java:4655)
07-31 15:32:10.247: W/System.err(6720): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
07-31 15:32:10.247: W/System.err(6720): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
07-31 15:32:10.247: W/System.err(6720): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
07-31 15:32:10.247: W/System.err(6720): at android.view.View.layout(View.java:14063)
07-31 15:32:10.247: W/System.err(6720): at android.view.ViewGroup.layout(ViewGroup.java:4655)
07-31 15:32:10.247: W/System.err(6720): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
07-31 15:32:10.247: W/System.err(6720): at android.view.View.layout(View.java:14063)
07-31 15:32:10.247: W/System.err(6720): at android.view.ViewGroup.layout(ViewGroup.java:4655)
07-31 15:32:10.247: W/System.err(6720): at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1520)
07-31 15:32:10.247: W/System.err(6720): at android.view.View.layout(View.java:14063)
07-31 15:32:10.247: W/System.err(6720): at android.view.ViewGroup.layout(ViewGroup.java:4655)
07-31 15:32:10.247: W/System.err(6720): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
07-31 15:32:10.252: W/System.err(6720): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
07-31 15:32:10.252: W/System.err(6720): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
07-31 15:32:10.252: W/System.err(6720): at android.view.View.layout(View.java:14063)
07-31 15:32:10.252: W/System.err(6720): at android.view.ViewGroup.layout(ViewGroup.java:4655)
07-31 15:32:10.252: W/System.err(6720): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
07-31 15:32:10.252: W/System.err(6720): at android.view.View.layout(View.java:14063)
07-31 15:32:10.252: W/System.err(6720): at android.view.ViewGroup.layout(ViewGroup.java:4655)
07-31 15:32:10.252: W/System.err(6720): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
07-31 15:32:10.252: W/System.err(6720): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
07-31 15:32:10.257: W/System.err(6720): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
07-31 15:32:10.257: W/System.err(6720): at android.view.View.layout(View.java:14063)
07-31 15:32:10.257: W/System.err(6720): at android.view.ViewGroup.layout(ViewGroup.java:4655)
07-31 15:32:10.257: W/System.err(6720): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
07-31 15:32:10.257: W/System.err(6720): at android.view.View.layout(View.java:14063)
07-31 15:32:10.257: W/System.err(6720): at android.view.ViewGroup.layout(ViewGroup.java:4655)
07-31 15:32:10.257: W/System.err(6720): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2017)
07-31 15:32:10.257: W/System.err(6720): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1838)
07-31 15:32:10.257: W/System.err(6720): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1131)
07-31 15:32:10.257: W/System.err(6720): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4611)
07-31 15:32:10.257: W/System.err(6720): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
07-31 15:32:10.257: W/System.err(6720): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
07-31 15:32:10.257: W/System.err(6720): at android.view.Choreographer.doFrame(Choreographer.java:525)
07-31 15:32:10.257: W/System.err(6720): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
07-31 15:32:10.257: W/System.err(6720): at android.os.Handler.handleCallback(Handler.java:615)
07-31 15:32:10.257: W/System.err(6720): at android.os.Handler.dispatchMessage(Handler.java:92)
07-31 15:32:10.257: W/System.err(6720): at android.os.Looper.loop(Looper.java:137)
07-31 15:32:10.257: W/System.err(6720): at android.app.ActivityThread.main(ActivityThread.java:4898)
07-31 15:32:10.257: W/System.err(6720): at java.lang.reflect.Method.invokeNative(Native Method)
07-31 15:32:10.257: W/System.err(6720): at java.lang.reflect.Method.invoke(Method.java:511)
07-31 15:32:10.257: W/System.err(6720): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
07-31 15:32:10.257: W/System.err(6720): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
07-31 15:32:10.257: W/System.err(6720): at dalvik.system.NativeStart.main(Native Method)
`