Sorry for my English. I want to do like this: when you first time enters in activity with viewPager you can see the animation, it will be little swipe automatically to the next page and then came back to the current page. I don't know how to do it. Please if you know give me some information, thanks. I try did it like this scrollBy
but it not work
Asked
Active
Viewed 315 times
0

Ramana V V K
- 1,245
- 15
- 24

g71132
- 671
- 2
- 10
- 17
-
1what do you want to do exactly? need animation on page change in view pager or anything else? – Ramana V V K May 23 '17 at 14:47
-
@ramanavv i want show user animation swipe on the right page on 10px(for example) it for this what would the user know in this page he can swipe. I use viewPager without tabBar – g71132 May 23 '17 at 17:36
1 Answers
1
It sounds like you are thinking of a ViewPager
But, if this is not what you are looking for, if you just want to scroll horizontally, you can use myView.getRight()
or myView.getLeft()
The the code below is an example of this.
myScrollView.scrollTo(myView.getRight());
If you want to scroll vertically, you can use myView.getBottom()
or myView.getTop()
And again, the code below is an example of this
myScrollView.scrollTo(myView.getBottom());
For a more in depth explanation about how scrolling works, have a look at this

Simon Andersson
- 751
- 1
- 9
- 29