问题
I am working on ViewPager
but a surprising problem comes up.
The ViewPager
when scrolled to get next page, it got stuck if I take my finger off from screen, but normally the view should bounce back or next view should come up which it does not. Instead, ViewPager
keep stuck in middle of both. I am loading bitmaps via AsyncTask
and if I scroll fast there is no problem in loading bitmaps.
Here is preview of what I am trying to say -

So if I leave picture while changing view, it just get stuck there, no bounce back or next view untill i manually scroll it. Here is ViewPager
XML
<android.support.v4.view.ViewPager
android:id="@+id/albumArt"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:maxHeight="220dp"
android:scaleType="fitXY"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
And here is the code I am using: http://developer.android.com/training/displaying-bitmaps/display-bitmap.html
Thanks for giving your time and ask me if any further code required.
Cheers
来源:https://stackoverflow.com/questions/31537039/viewpager-do-not-behave-elastically-or-get-stuck-in-views