You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a listview with rows containing a viewpager. this viewpager has a set of images like gallery.I want to retain the viewpager item, as the user scrolls up or down the listview.
I have tried it many times to make it work by setting the onpagechangelistner but OnPageChangeListener always defaults to zero when scrolling the listview which has the viewpager.
I tried to do the same thing with android.support.v4.view.ViewPager and that one works fine but does not have the looping capability.
The text was updated successfully, but these errors were encountered:
Ok so I tried commenting the line which sets the current item to 0, in the setAdapter method of the LoopViewPager class and it seems to have solved the issue. When I set and adapter to my viewholder.pager, I do set the current item to my own default, so the change does not make problem for me. so far so good thanks
@OverRide
public void setAdapter(PagerAdapter adapter) {
mAdapter = new LoopPagerAdapterWrapper(adapter);
mAdapter.setBoundaryCaching(mBoundaryCaching);
super.setAdapter(mAdapter);
//setCurrentItem(0, false); <--- this is the line I commented
}
I have a listview with rows containing a viewpager. this viewpager has a set of images like gallery.I want to retain the viewpager item, as the user scrolls up or down the listview.
I have tried it many times to make it work by setting the onpagechangelistner but OnPageChangeListener always defaults to zero when scrolling the listview which has the viewpager.
I tried to do the same thing with android.support.v4.view.ViewPager and that one works fine but does not have the looping capability.
The text was updated successfully, but these errors were encountered: