Android:如何在xml中创建床设计?

Sub*_*xmi 6 android android-animation

beddesign

实际上我能够通过使用RotateAnimation但是当我想要改变它并应用任何动画时遇到问题来创建这个设计.我们知道,Animation它不会改变视图的实际属性,它只会动画它.所以每当我遇到这样的问题时:

完成动画后动画回到真实状态,每次从初始位置开始.

所以为了避免这种情况,我想在xml中应用静态设计.我试过使用android:rotation但没有按照确切的要求得到.建议和帮助将是最明显的.请建议.

fro*_*tto 0

我知道android:fillAfter="true"会导致很多问题!

另一种选择是您可以将动画侦听器添加到动画中,一旦动画完成,您可以手动设置视图的最终转换。

yourAnimation.setAnimationListener(new Animation.AnimationListener() {
    @Override
    public void onAnimationStart(Animation animation) {

    }

    @Override
    public void onAnimationEnd(Animation animation) {
        /* Here, you could set them manually */
    }

    @Override
    public void onAnimationRepeat(Animation animation) {

    }
});
Run Code Online (Sandbox Code Playgroud)