Android: How to create a bed design in xml?

beddesign

In fact, I can create this design using RotateAnimation , but I got a problem when I want to change it and apply any animation. We know that Animation does not change the actual properties of the View, it only enlivens it, therefore, every time I encounter a problem , eg:

the animation will return to its real state after the end of the animation and start each time from the starting position.

Therefore, to avoid this, I want to apply static design in xml. I tried using android:rotation but didn't get exactly on demand. suggestions and help will be mostly noticeable. Please suggest.

+6
source share
1 answer

I know that android:fillAfter="true" causes a lot of problems!

Another option: you could add the animation to the animation, and as soon as the animation ends, you manually set the final transcripts to the views.

 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) { } }); 
0
source

All Articles