Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

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)