Have problem: don't know how to apply new position to element after animation (applyd to this element) For example have .xml animation
<translate
android:duration="6000"
android:fromXDelta="1000"
android:toXDelta="720"
/>
of translation and after applyin it for my button button.setAnimation(translate)
, button back to previous position. How apply new position to button(actually the position when animation finish).
You should try with fillEnabled=true & fillAfter=true, as below:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:fillEnabled="true"
android:fillAfter="true"
android:zAdjustment="top">
<translate
android:duration="6000"
android:fromXDelta="1000"
android:toXDelta="720"
/>
</set>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments