Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
scaleanimator.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<set>
<objectAnimator
android:duration="200"
android:propertyName="translationZ"
android:valueTo="6dp"
android:valueType="floatType" />
<objectAnimator
android:duration="200"
android:propertyName="scaleX"
android:valueTo="1.1"
android:valueType="floatType" />
<objectAnimator
android:duration="200"
android:propertyName="scaleY"
android:valueTo="1.1"
android:valueType="floatType" />
</set>
</item>
<item>
<set>
<objectAnimator
android:duration="200"
android:propertyName="translationZ"
android:valueTo="0dp"
android:valueType="floatType" />
<objectAnimator
android:duration="200"
android:propertyName="scaleX"
android:valueTo="1"
android:valueType="floatType" />
<objectAnimator
android:duration="200"
android:propertyName="scaleY"
android:valueTo="1"
android:valueType="floatType" />
</set>
</item>
</selector>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment