Auto Scroll Images After 2 Seconds In ViewPager By Pageadapter
I am create a imagescroll view. There is two activity in images. first user can scroll to image which is working fine. and second auto-scroll images after 2 second. i tried a numbe
Solution 1:
You want to scroll the ViewPager
delayed by 2 seconds, right?
Two things you need for that:
- Wait for two seconds, by calling your code delayed with
View.postDelayed(..., 2000L)
- Scroll to the right position by
View.scrollBy()
orscrollTo()
Remark: I think the links do not point to the exact position. You must search on the web page for the method like scrollBy
, scrollTo
or postDelayed
.
Post a Comment for "Auto Scroll Images After 2 Seconds In ViewPager By Pageadapter"