Android gallery "snappiness"

I am wondering if there is a way to increase the "attachment" to the Android gallery. in other words, I want the cast speed to accelerate faster than the default. this throw should lead to less scrolling and should stop faster.

looking at the source, it looks like I want to change the value of ViewConfiguration.SCROLL_FRICTION, but as you can see that the constant and the use of the code use this, you need to dig into the private classes used by Gallery.

any ideas? thank.

+3
source share
2 answers

I found something that gave the effect I want with little problems. expand the gallery and override onFling (),

@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
        float velocityY) {
    return super.onFling(e1, e2, velocityX / 10, velocityY / 10);
}

10 , .

+4

TouchEvent , , . , , , . , - , .

+1

All Articles