Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/tachiyomiorg/directionalviewpager
- Owner: tachiyomiorg
- License: apache-2.0
- Created: 2018-08-14T06:57:10.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2022-10-30T16:41:27.000Z (over 2 years ago)
- Last Synced: 2023-08-06T18:40:13.423Z (over 1 year ago)
- Topics: android, android-library
- Language: Java
- Homepage:
- Size: 159 KB
- Stars: 11
- Watchers: 5
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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());
```