A rubber indicator for ViewPager
The attributes for RubberIndicator are not yet finished.
A toy example is provided in sample.
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.
public interface OnMoveListener {
void onMovedToLeft();
void onMovedToRight();
}
MIT
2,210 followers · starred Oct 2015
19 followers · starred Jul 2015
14 followers · starred Feb 2021
A rubber indicator for ViewPager
The attributes for RubberIndicator are not yet finished.
A toy example is provided in sample.
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.
public interface OnMoveListener {
void onMovedToLeft();
void onMovedToRight();
}
MIT
2,210 followers · starred Oct 2015
19 followers · starred Jul 2015
14 followers · starred Feb 2021