Reputation: 2106
In my Android app, I am have been able to auto-scroll view pager after a certain duration. I could not find a pager indicator that would show the time remaining before the scroll happens.
I have attached screenshot of a website below to give an idea of what I am trying to achieve.
Would help if you could share a library or code you have used for the tab indicator.
Upvotes: 4
Views: 1279
Reputation: 424
You can use the following library to display indicators and then programmatically scroll your View Pager to next position, using these functions in that library.
@Override
public void onNext() {
//Move to position +1
}
@Override
public void onPrev() {
//Move to position -1
}
@Override
public void onComplete() {
//Called when complete
}
Upvotes: 1
Reputation: 556
I integrated same functionality of view pager with the help of this library. https://github.com/smarteist/Android-Image-Slider In this library you can set auto scroll time of sliding the view pager with this attribute app:sliderIndicatorAnimationDuration and apply different animations while sliding.
Furthermore, Disable the indicators with this attributes app:sliderIndicatorEnable =false.
Use this library for indicators.https://github.com/tommybuonomo/dotsindicator I hope it might be help for you cause I have build same functionally in my app.
Upvotes: 0