Android ScaleAnimation and TranslateAnimation, how to avoid ScaleAnimation movement

前端 未结 4 1537
轮回少年
轮回少年 2021-02-09 19:11

I have an AnimationSet with inside a ScaleAnimation and a TranslateAnimation like this:

TranslateAnimation:

TranslateAnimation goTopFromRight =
        n         


        
4条回答
  •  南方客
    南方客 (楼主)
    2021-02-09 19:44

    I remember having weird problems with nested animations as well. Have you tried setting the pivot point manually? See public ScaleAnimation (float fromX, float toX, float fromY, float toY, float pivotX, float pivotY) from http://developer.android.com/reference/android/view/animation/ScaleAnimation.html for it. It could work.

提交回复
热议问题