Linked Questions

6 votes
1 answer
12k views

Increase viewpager smoothscroll duration [duplicate]

I'm using a ViewPager subclass MyPager (which is almost the same), and I use its setCurrentItem(int index, boolean smooth) method, with the smooth parameter set to true. It's actually a little ...
elgui's user avatar
  • 3,313
613 votes
27 answers
398k views

How do disable paging by swiping with finger in ViewPager but still be able to swipe programmatically?

I have ViewPager and below it I have 10 buttons. By clicking on button, for example #4, the pager goes immediately to page #4 by mPager.setCurrentItem(3);. But, I want to disable the paging by swiping ...
theateist's user avatar
  • 14.1k
110 votes
10 answers
89k views

Slowing speed of Viewpager controller in android

Is there any way to slow the scroll speed with the viewpager adaptor in android? You know, I've been looking at this code. I can't figure out what I'm dong wrong. try{ Field mScroller = mPager....
Alex Kelly's user avatar
  • 1,603
52 votes
14 answers
42k views

ViewPager setCurrentItem(pageId, true) does NOT smoothscroll

I am compiling on SDK 4.03, Samsung Infuse Android 2.2, Support Library for Android 4, and using ViewPager in my app, actual swipe works fine, but when I do viewPager.setCurrentItem(id); // , or ...
Code Droid's user avatar
  • 10.4k
31 votes
10 answers
37k views

How to do circular scrolling on ViewPager?

I would like to set my ViewPager to do circular scrolling. I want the first page to be able to scroll to page 2 AND the last page. And I would like my last page to scroll to [last page -1] AND the ...
portfoliobuilder's user avatar
5 votes
1 answer
3k views

A working example for fakedrag for viewpager

I want to simulate a fakeDrag on a viewpager and I searched for sometime but I couldn't find any good example for it. here is what i'v done: public void onWindowFocusChanged(boolean hasFocus) { super....
Ali Haghighatdoost's user avatar
0 votes
0 answers
3k views

How to reduce the sliding transition speed of view pager in android?

I need to slow down the speed of sliding in view pager when clicking the button not swiping. Since it is very high speed in default. Thanks in advance.
Anas Ahamed's user avatar
0 votes
1 answer
2k views

Flickering page tab strip when setting view pager current item

I have an infinitely scrolling ViewPager. To accomplish this, I have 5 items (0,1,2,3,4). When at rest, I am always at tab 2. After onPageScrollStateChanged returns to SCROLL_STATE_IDLE, I update the ...
Sean Kladek's user avatar
  • 4,426
0 votes
1 answer
1k views

How to Scroll ViewPager?

I am new to Android.How to use ViewPager.scrollBy(int x,int y)? ViewPager.scrollBy(int x,int y) is not updating View new Handler().post(new Runnable() { @Override ...
Manoj's user avatar
  • 2,819
0 votes
1 answer
259 views

Jump instantly with ViewPager

I have a tabbed ViewPager which lets the user jump to the corresponding page depending on which tab they press. The problem is that you see the view pager scroll really quickly to the selected page, ...
user3074140's user avatar
0 votes
0 answers
119 views

How to pass slowly an animation pushing a button

I use a View Pager in my app to get animations between fragments, but I've got a problem because I use a button to pass fragments, I have disabled swipe option, and when a fragment pass to other, it ...
Emilio Bello's user avatar