0

I have a TextView which I rotate.
The rotation causes the text View to be a little bit translated. Because of this at the same time I want to do 2 transitions in x and y direction.

I know where the View should be but I don´t know where it is and when one wants to do a translation I only can tell how far I want to transpose not what to.

myTextView.setTranslationX(60);

that is the function I know and every other way you have to give how far not what to.

I always want to translate the view to left corner of my device.

** I know that the first thing that comes to mind is to get the distance between edge of screen and edge of View but that doesn´t work because the rotation hasn´t finished and I can´t wait for it because I want it to look smoothly animated.

Cœur
  • 37,241
  • 25
  • 195
  • 267
joohaha
  • 147
  • 2
  • 3
  • 12
  • check out this link http://stackoverflow.com/questions/23209060/how-to-animate-from-one-x-y-coordinate-to-another-java-processing – youngdero Jan 07 '16 at 15:23
  • Plz provide a picture to help us to understand you. – tiny sunlight Jan 07 '16 at 15:29
  • How far are you rotating the view? Depending on that, you could measure the view beforehand, find its center, and then calculate what its dimensions will be in its new orientation, assuming you only rotate it so the center doesn't change. Give more info and I will add an answer. – Steve Jan 07 '16 at 17:14

0 Answers0