InfiniteViewPager (Parent)

A modified ViewPager that allows infinite paging

License

License

GroupId

GroupId

com.thehayro
ArtifactId

ArtifactId

infiniteviewpager-parent
Last Version

Last Version

0.4
Release Date

Release Date

Type

Type

pom
Description

Description

InfiniteViewPager (Parent)
A modified ViewPager that allows infinite paging
Source Code Management

Source Code Management

https://github.com/thehayro/infiniteviewpager

Download infiniteviewpager-parent

How to add to project

<!-- https://jarcasting.com/artifacts/com.thehayro/infiniteviewpager-parent/ -->
<dependency>
    <groupId>com.thehayro</groupId>
    <artifactId>infiniteviewpager-parent</artifactId>
    <version>0.4</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.thehayro/infiniteviewpager-parent/
implementation 'com.thehayro:infiniteviewpager-parent:0.4'
// https://jarcasting.com/artifacts/com.thehayro/infiniteviewpager-parent/
implementation ("com.thehayro:infiniteviewpager-parent:0.4")
'com.thehayro:infiniteviewpager-parent:pom:0.4'
<dependency org="com.thehayro" name="infiniteviewpager-parent" rev="0.4">
  <artifact name="infiniteviewpager-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.thehayro', module='infiniteviewpager-parent', version='0.4')
)
libraryDependencies += "com.thehayro" % "infiniteviewpager-parent" % "0.4"
[com.thehayro/infiniteviewpager-parent "0.4"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • infiniteviewpager
  • infiniteviewpager-sample

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

Versions

Version
0.4
0.3