Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liangfeidotme/androidrubberindicator
A rubber indicator
https://github.com/liangfeidotme/androidrubberindicator
Last synced: 3 months ago
JSON representation
A rubber indicator
- Host: GitHub
- URL: https://github.com/liangfeidotme/androidrubberindicator
- Owner: liangfeidotme
- License: mit
- Archived: true
- Created: 2015-06-25T17:13:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-28T14:51:23.000Z (over 5 years ago)
- Last Synced: 2024-07-30T14:17:41.291Z (5 months ago)
- Language: Java
- Homepage:
- Size: 192 KB
- Stars: 1,589
- Watchers: 60
- Forks: 234
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RubberIndicator
[![Join the chat at https://gitter.im/LyndonChin/AndroidRubberIndicator](https://badges.gitter.im/LyndonChin/AndroidRubberIndicator.svg)](https://gitter.im/LyndonChin/AndroidRubberIndicator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A rubber indicator for ViewPager
* Designed by [Valentyn Khenkin](https://dribbble.com/shots/2090803-Rubber-Indicator?list=searches&tag=indicator&offset=7)
* [Here](http://codepen.io/machycek/full/eNvyjb/) is the CSS version## Usage
The attributes for `RubberIndicator` are not yet finished.
A toy example is provided in [sample](sample/src/main/java/com/liangfeizc/rubberindicator/MainActivity.java).## Introduction
APIs offered by **RubberIndicator**.
|APIs | Usage|
|---|---|
|setCount(int count)|Set the count of indicators|
|setCount(int count, int focusPos)|Set the count and specify the focusing indicator|
|setFocusPosition(int pos)|Set focusing indicator|
|getFocusPosition()|Get focusing indicator|
|moveToLeft()|Move the focusing indicator to left|
|moveToRight()|Move the focusing indicator to right|In addition to the APIs listed in the table, **RubberIndicator** also provides a callback listener - **OnMoveListener** for the user should be notified when the moving animator finished.
```java
public interface OnMoveListener {
void onMovedToLeft();
void onMovedToRight();
}
```## Me
* [weibo](http://weibo.com/liangfeizc)
* [twitter](https://twitter.com/JpRyouhi)## License
MIT