Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


slowing speed of viewpager controller in android


slowing speed of viewpager controller in android  using -'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.getClass().getDeclaredField("mScroller");
    mScroller.setAccessible(true);
    Scroller scroll = new Scroller(cxt);
    Field scrollDuration = scroll.getClass().getDeclaredField("mDuration");
    scrollDuration.setAccessible(true);
    scrollDuration.set(scroll, 1000);
    mScroller.set(mPager, scroll);
}catch (Exception e){
    Toast.makeText(cxt, "something happened", Toast.LENGTH_LONG).show();
}


It doesn't change anything yet no exceptions occur?
    

asked Oct 7, 2015 by mca.agarwal
0 votes
38 views



Related Hot Questions



Government Jobs Opening


...