Someone Somewhere
Someone Somewhere

Reputation: 23787

how to reduce the "friction" of the Gallery widget?

I want to make the gallery widget smoother and travel farther down the list of images.

using android:animationDuration="1000" certainly makes it smoother

However, I want to reduce the friction as well. How can that be done ?

(Android 2.2)

Upvotes: 0

Views: 778

Answers (3)

Codeman
Codeman

Reputation: 12375

For the animation, you could try implementing your own interpolator. That's the only thing I could think of! :)

Upvotes: 0

Petter
Petter

Reputation: 149

Try to override the onFling method and just multiply the velocity by the factor you want, this will effectively lower the friction.

@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
        float velocityY) {

    velocityX=velocityX*5;

    return super.onFling(e1, e2, velocityX, velocityY);
}

Upvotes: 3

Romain Guy
Romain Guy

Reputation: 98501

You cannot set the friction of the Gallery widget.

Upvotes: 2

Related Questions