I’m trying to animate an image (used as background image but it doesn’t really matter) in such a way that it will move from left to right but in a cyclic way.
For example, if the image size is exactly as the view size, once the most right column of pixels exceeded the right edge, it will appear on the most left side of the view.
I’ve thought of several ways of doing it but all of them sounds too complicated to me and I’m sure there is a more “core” way to do that.
Thanks,
Lior.
Could you use
canvas.drawBitmap(sourceRectangle,outputRectangle,null)to cut a part from a strip bitmap background? This is a similar method that is used to animate a bitmap, but you would add one pixel to the sourceRectangle’s left and right values until it hits the edge of the background strip.