Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch 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.

    Field mScroller = mPager.getClass().getDeclaredField("mScroller");
    Scroller scroll = new Scroller(cxt);
    Field scrollDuration = scroll.getClass().getDeclaredField("mDuration");
    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

Related Hot Questions

Government Jobs Opening