Apply transform after Android text view rotation animation

I am performing a simple rotate animation on a textview . Animation is performed as needed, but transformation is not applied .

My animation code:

 Animation animation = new RotateAnimation(0.0f,90.0f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f); animation.setDuration(200); animation.setFillEnabled(true); animation.setFillAfter(true); myTextView.startAnimation(animation); 

Now, if text = "Testing"... after the animation, if I touch the bottom of the text (or touch "g"), it will not respond. But if I touch the middle part of the rotated text, it answers ... After pressing the rotate button again, the textview animation starts from the old position. Therefore, I think the conversion does not apply.

+4
source share
1 answer

Animation is just animation, it draws a view elsewhere. This does not mean that the presentation is located elsewhere. To place the view in another place, you need to do it manually in accordance with the specific rules of the LayoutManager.

0
source

Source: https://habr.com/ru/post/1395387/


All Articles