0

I have a custom compound view consisting of a textview above an imagebutton (wrapped in LinearLayout). I would like to be able to apply certain gesture-based transformations on it including:

  • rotating the imageview with two fingers about it's center. TextView stays same orientation
  • Pinch/zoom to scale the imageview (textview should remain the same size)
  • move the compound view around the layout

In this scenario there will be several of these views populating a relative/framelayout. The user should be able to interact/modify each view individually.

I've achieved at least a partial implementation for the moving around, based off the answer here: https://stackoverflow.com/a/18806475/2879847. I've read/tried some implementations of the scaling/rotation functions but they seem to apply only to the drawable/bitmap rather than the containing view object so, I'm not sure where to go from there. Any help would be great

Many Thanks - let me know if you guys need any further clarifications.

Community
  • 1
  • 1
Kurian Vithayathil
  • 807
  • 2
  • 7
  • 20
  • By the way I am using API 15 upwards so I'm guessing i can use setX/Y and setRotationX/Y methods. But any input would be great, i'm still new to the nitty-gritty of android views – Kurian Vithayathil Feb 03 '14 at 16:15

1 Answers1

1

I've managed to achieve what i want (seems to be working well) - will post some code once my workload dies down.

Kurian Vithayathil
  • 807
  • 2
  • 7
  • 20