title: Error resetting Adapter
body: <p>I have used Aphid-FlipView Library in my app, and i am trying to reset the adapter, but its giving error and crashing..</p>
  
  <pre><code>ArrayAdapter adp = (ArrayAdapter) flipView.getAdapter();
                  if (adp != null) {
                      adp.clear();                    
                      adp.notifyDataSetChanged();
  </code></pre>
  
  <p>Logcat Result is as follows</p>
  
  <pre><code>10-12 18:02:39.939: E/AndroidRuntime(22161): FATAL EXCEPTION: main
  10-12 18:02:39.939: E/AndroidRuntime(22161): Process: com.example.rssreader2, PID: 22161
  10-12 18:02:39.939: E/AndroidRuntime(22161): junit.framework.AssertionFailedError: Invalid selection position
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at junit.framework.Assert.fail(Assert.java:50)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at junit.framework.Assert.assertTrue(Assert.java:20)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.aphidmobile.flip.FlipViewController.setSelection(FlipViewController.java:312)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.aphidmobile.flip.FlipViewController.onDataChanged(FlipViewController.java:606)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.aphidmobile.flip.FlipViewController.access$2(FlipViewController.java:596)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.aphidmobile.flip.FlipViewController$MyDataSetObserver.onChanged(FlipViewController.java:613)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.database.DataSetObservable.notifyChanged(DataSetObservable.java:37)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.widget.BaseAdapter.notifyDataSetChanged(BaseAdapter.java:50)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.widget.ArrayAdapter.notifyDataSetChanged(ArrayAdapter.java:286)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.example.rssreader2.MainActivity.UpdateConnectedFlags(MainActivity.java:153)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.example.rssreader2.MainActivity.access$4(MainActivity.java:144)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.example.rssreader2.MainActivity$1.onRefresh(MainActivity.java:108)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.support.v4.widget.SwipeRefreshLayout$1.onAnimationEnd(SwipeRefreshLayout.java:182)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.support.v4.widget.CircleImageView.onAnimationEnd(CircleImageView.java:107)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.finishAnimatingView(ViewGroup.java:5269)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.draw(View.java:14397)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2947)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.draw(View.java:14475)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.getDisplayList(View.java:13369)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.getDisplayList(View.java:13411)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.draw(View.java:14189)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.getDisplayList(View.java:13364)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.getDisplayList(View.java:13411)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.draw(View.java:14189)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.draw(View.java:14475)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.android.internal.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:381)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.getDisplayList(View.java:13369)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.getDisplayList(View.java:13411)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.draw(View.java:14189)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.draw(View.java:14475)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.widget.FrameLayout.draw(FrameLayout.java:472)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2587)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.getDisplayList(View.java:13369)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.View.getDisplayList(View.java:13411)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1570)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1449)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewRootImpl.draw(ViewRootImpl.java:2381)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2253)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1883)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.Choreographer.doCallbacks(Choreographer.java:574)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.Choreographer.doFrame(Choreographer.java:544)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.os.Handler.handleCallback(Handler.java:733)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.os.Handler.dispatchMessage(Handler.java:95)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.os.Looper.loop(Looper.java:136)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at android.app.ActivityThread.main(ActivityThread.java:5081)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at java.lang.reflect.Method.invokeNative(Native Method)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at java.lang.reflect.Method.invoke(Method.java:515)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
  10-12 18:02:39.939: E/AndroidRuntime(22161):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  </code></pre>
  
  <p>Same code works fine if i reset ListView. Is it problem with the code or something is resulting error from the library. Any Alternative way of resetting adapter. Thanks.</p>