Created
October 12, 2017 20:03
-
-
Save mwshubham/8e1012e2fdf05b618abd5bba5b72e34c to your computer and use it in GitHub Desktop.
Android Depressed Button Style
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"> | |
<set> | |
<objectAnimator android:duration="100" android:propertyName="translationZ" android:valueTo="4dp" android:valueType="floatType" /> | |
</set> | |
</item> | |
<!-- base state --> | |
<item android:state_enabled="true"> | |
<set> | |
<objectAnimator android:duration="100" android:propertyName="translationZ" android:startDelay="100" android:valueTo="0" android:valueType="floatType" /> | |
</set> | |
</item> | |
<item> | |
<set> | |
<objectAnimator android:duration="0" android:propertyName="translationZ" android:valueTo="0" android:valueType="floatType" /> | |
</set> | |
</item> | |
</selector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment