Created
December 23, 2016 10:28
-
-
Save talhahasanzia/c5b9308fdc5f8637c6d2c56e0c458dc7 to your computer and use it in GitHub Desktop.
Adding elevation on button press.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_enabled="true" android:state_pressed="true"> | |
<objectAnimator | |
android:duration="@android:integer/config_shortAnimTime" | |
android:propertyName="translationZ" | |
android:valueTo="8dp" | |
android:valueType="floatType" | |
/> | |
</item> | |
<item> | |
<objectAnimator | |
android:duration="@android:integer/config_shortAnimTime" | |
android:propertyName="translationZ" | |
android:valueTo="0dp" | |
android:valueType="floatType" | |
/> | |
</item> | |
</selector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment