Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tachiyomiorg/directionalviewpager

Implementation of a ViewPager that supports both vertical and horizontal swiping.
https://github.com/tachiyomiorg/directionalviewpager

android android-library

Last synced: 3 months ago
JSON representation

Implementation of a ViewPager that supports both vertical and horizontal swiping.

Awesome Lists containing this project

README

        

Implementation of a ViewPager that supports both vertical and horizontal swiping.
It's based on the support library 27.1.1 and uses the same package as ViewPager
in order to use its interfaces and make it compatible with adapters and listeners.

A pager can be instantiated either from XML, optionally providing `android:orientation`:

```xml

```

Or from code:

```kt
val pager = DirectionalViewPager(context, false) // or true for horizontal
```

The direction of the pager can be changed at runtime with:

```kt
pager.setHorizontal(!pager.isHorizontal());
```