android视图旋转动画不旋转焦点区域吗?

android视图旋转动画不旋转焦点区域吗?,android,Android,我正在旋转一个矩形区域视图,然后以这种方式应用变换 AnimationSet snowMov1 = new AnimationSet(true); RotateAnimation rotate1 = new RotateAnimation(0,-90, Animation.RELATIVE_TO_SELF,0.0f , Animation.RELATIVE_TO_SELF,0.0f ); rotate1.setDuration(000);

我正在旋转一个矩形区域视图,然后以这种方式应用变换

     AnimationSet snowMov1 = new AnimationSet(true);
        RotateAnimation rotate1 = new RotateAnimation(0,-90, Animation.RELATIVE_TO_SELF,0.0f , Animation.RELATIVE_TO_SELF,0.0f );
        rotate1.setDuration(000);
        snowMov1.addAnimation(rotate1);

        TranslateAnimation trans1 =  new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 1.0f);
        trans1.setDuration(000);
        snowMov1.addAnimation(trans1);
        snowMov1.setFillAfter(true);    //this will apply the animation and keep the transformation
但是,这不会旋转该视图的焦点区域。重点领域保持不变。 有人能帮我如何旋转焦点区域吗


谢谢。

不幸的是,无法自动执行此操作。动画仅更新视图的图形位置,而不更新其实际位置。在这里,您最好为动画设置一个侦听器,并实际更改
onAnimationEnd
方法中的位置