AutoScrollViewPager
AutoScrollViewPager copied to clipboard
UseFragmentStatePagerAdapter instead of PagerAdapter
If i use FragmentStatePager adapter image not loading and if i use PagerAdapter Image Correctly loaded ! what will be issue on my side?
If i use FragmentStatePager adapter image not loading and if i use PagerAdapter Image Correctly loaded ! what will be issue on my side?
No. it's not your problem.
Infinite scrollable ViewPager wraps user's adapter with a new adapter, which returns a larger count in getCount
, and maps the wrapper adapter's[the new adapter] item to the wrapped adapter's[user's adapter] item. As a result, in the wrapper adapter, multiple items will be mapped to the same item in the wrapped adapter.
Because FragmentStatePagerAdapter caches fragments, and a fragment can't be added multi times, FragmentStatePagerAdapter can't be used in this case.