Вопрос

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.

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top