Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liangfeidotme/AndroidScreenSlidePager
Pager (especially for ViewPager) indicator in two styles: circle & fraction.
https://github.com/liangfeidotme/AndroidScreenSlidePager
Last synced: about 6 hours ago
JSON representation
Pager (especially for ViewPager) indicator in two styles: circle & fraction.
- Host: GitHub
- URL: https://github.com/liangfeidotme/AndroidScreenSlidePager
- Owner: liangfeidotme
- License: mit
- Archived: true
- Created: 2015-03-26T09:26:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T05:28:55.000Z (over 4 years ago)
- Last Synced: 2024-07-29T05:21:03.869Z (4 months ago)
- Language: Java
- Homepage: http://liangfei.me
- Size: 9.31 MB
- Stars: 207
- Watchers: 10
- Forks: 72
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-android-ui - https://github.com/LyndonChin/Android-ScreenSlidePager
- awesome-android-ui - https://github.com/LyndonChin/Android-ScreenSlidePager
README
# PagerIndicator
[ ![Download](https://api.bintray.com/packages/lyndonchin/maven/pagerindicator/images/download.svg?version=0.0.2) ](https://bintray.com/lyndonchin/maven/pagerindicator/0.0.2/link)Pager (especially for ViewPager) indicator in two styles: circle & fraction.
## Demo
circle | fraction
--- | ---
|## Dependency
```groovy
implementation 'me.liangfei:pagerindicator:0.0.2'
```## Usage
Two attributes are provided:
* `app:indicator_type` = [fraction | circle].
* `app:indicator_spacing` works only for the circle type indicator.**Step 1: add `PageIndicator` to the bottom of the ViewPager.**
```xml
```
**Step 2: pass the ViewPager instance to the PagerIndicator instance.**
```kotlin
val pageIndicator = findViewById(R.id.indicator);
pageIndicator.setViewPager(pager);
```You can just take `PageIndicator` as a normal view to make your layout, because it extends `LinearLayout`.
Check the [app](app) module for more details.
## dependencies
* [Fresco](https://github.com/facebook/fresco)## 欢迎关注我的微信公众号(Chinese only)