Make Android animation effect (Grow of a button) permanent and only reverted manually


Make Android animation effect (Grow of a button) permanent and only reverted manually



Currently, I have an Animation defined that:


Animation


final Animation anim = AnimationUtils.loadAnimation(this, R.anim.scale);
v.startAnimation(anim);



And here's the scale.xml


scale.xml


<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<scale
android:fillAfter="false"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotX="50%"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotY="50%"
android:toXScale="1.4"
android:toYScale="1.4"
android:duration="1000"/>
</set>



The button is growing then reverting back to normal. How do I make the effect of this animation, which is the button growing to 140%, permanent unless indicated otherwise programatically with a v.clearAnimation()?


v.clearAnimation()









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV