问题
I made an Image Viewer with TouchImageView that I forked to my needs. In particular, you can fit the image vertically in the screen, and then drag the image from left to right. This is nice for a panorama, for example, that you can drag and see it all.
Now I want to do exactly this with panoramas without touching the screen, that is, an automatic constant drag.
I tried to implement this through a TranslateAnimation, but failed miserably: TranslateAnimation "moves the view", and the image is slowly being replaced with a growing black strip instead of more image.
Of course I can move the image 1 pixel, wait 1/100s, move again and so on, but there should be an easier way (and consuming less resources).
Is there some option in TranslateAnimation that allows to do this? How would you do it?
Thanks!!
来源:https://stackoverflow.com/questions/13963836/can-a-panorama-viewer-effect-be-done-with-translateanimation