2

I have an image of an arrow that I wish to animate so that I can point to something in the UI. The arrow looks like this...

enter image description here

And I wish to animate it so that it can stretch to look like this...

enter image description here

The challenge of this operation is that I cannot simply use a ScaleAnimation because the entire image of the arrow would stretch. Instead, I'm looking for some way to only stretch the tail of the arrow while keeping the head the same size. I thought that turning the arrow into a 9-patch image would work, but according to this question, that doesn't work. I've also looked at this question, which has a similar issue didn't provide me a solution.

Does anyone know of a way I can achieve this animation effect?

Community
  • 1
  • 1
Brian
  • 7,955
  • 16
  • 66
  • 107
  • 1
    A simple solution would be to just divide the arrow into two images that lie right next to each other. One part is the actual arrow, the other part the line on the left side of the arrow. When animating, you simply animate the left image that only contains the line. – Philipp Jahoda Aug 08 '13 at 17:14

0 Answers0