开发者

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.KEY开发者_运维知识库CODE_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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜