Erik
Erik

Reputation: 5701

Android: Disable 'bounce' effect in custom Gallery

I have a custom gallery with 'fullscreen' items and I have overridden the onFling() method of Gallery. In this overridden function, I check if the user had 'flinged' to the left or right, and act accordingly with

onKeyDown(KeyEvent.KEYCODE_DPAD_RIGHT, event); // OR
onKeyDown(KeyEvent.KEYCODE_DPAD_LEFT, event);

This works great, but there is some sort of 'bounce' animation when I scroll. The new image comes in and moves just too far, then moves back to the final position. Because the images I use are far too big, the bounce animation looks horrible and therefor I want to disable it.

Any suggestions?

Thanks a lot!

Erik

Upvotes: 6

Views: 3004

Answers (1)

Teo Choong Ping
Teo Choong Ping

Reputation: 12808

Try setting the android:animationDuration to very low value e.g., 20 or 10.

Upvotes: 2

Related Questions