Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

InfiniteViewPager is a modified android ViewPager widget that allows infinite paging.

License

Notifications You must be signed in to change notification settings

hayribakici/infiniteviewpager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS REPOSITORY IS DEPRACATED AND WILL BE READ-ONLY!

Google released the ViewPager2 and replaces the original ViewPager. Since this project is based on the old ViewPager, this repository is now read-only. If you want to have in "infinite" implementation of ViewPager2, you can check out Infinite-ViewPager2.

Thank you everyone for using this library.

InfiniteViewPager

InfiniteViewPager is a modified ViewPager that allows infinite paging.

Usage

Bind it in your layout:

<com.thehayro.view.InfiniteViewPager 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"/>

Setup the adapter:

public class MyInfinitePagerAdapter<T> extends InfinitePagerAdapter {  // ...
}

And initialize with any init value:

MyInfinitePagerAdapter<Integer> adapter = 
                    new MyInfinitePagerAdapter<Integer>(0);

Bind the adapter to the InfiniteViewPager with:

// ...
InfiniteViewPager pager = (InfiniteViewPager) findViewById(R.id...);
pager.setAdapter(adapter);

Also see website for further details.

Changelog

  • 0.4.1 fix #1 (thanks to RogerParis)
  • 0.4 added OnInfinitePageChangeListener
  • 0.3 fixed some errors
  • 0.2 Added custom 'setCurrentItem()'
  • 0.1 initial release

License

Apache Licence

About

InfiniteViewPager is a modified android ViewPager widget that allows infinite paging.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages