Reputation: 23787
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
Reputation: 12375
For the animation, you could try implementing your own interpolator. That's the only thing I could think of! :)
Upvotes: 0
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