I created a simple animation-based class and added an onclick listener to the view (LinearLayout in this example, just to make a quick proof of concept) that called startAnimation on the object (passing it an instance of my class). In my Animation class, I just get a reference to the Matrix Translation object and call setTranslate. So the translation looks great, but if I try to click again where I now see the object (the translated location), nothing happens. If I return to the original location and clicking, it will repeat the same animation from the same starting point. I got the impression that the translation will actually translate the object itself, and not just the visual representation. Is there a way to do what I expected from the animation class? Or is there another standard way to do such things? Any insight into why this behavior is the way it is? Thanks.
source share