Pressed state for alt badge (AND-157)
This commit is contained in:
parent
873711939d
commit
a6df8cb62d
|
@ -0,0 +1,35 @@
|
||||||
|
<?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="100"
|
||||||
|
android:propertyName="alpha"
|
||||||
|
android:valueTo="0.85"
|
||||||
|
android:valueFrom="1.0"
|
||||||
|
android:valueType="floatType"/>
|
||||||
|
<objectAnimator
|
||||||
|
android:duration="100"
|
||||||
|
android:propertyName="textColor"
|
||||||
|
android:valueTo="#80ffffff"
|
||||||
|
android:valueFrom="#fff"
|
||||||
|
android:valueType="colorType"/>
|
||||||
|
</set>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<set>
|
||||||
|
<objectAnimator
|
||||||
|
android:duration="200"
|
||||||
|
android:propertyName="alpha"
|
||||||
|
android:valueTo="1.0"
|
||||||
|
android:valueFrom="0.85"
|
||||||
|
android:valueType="floatType"/>
|
||||||
|
<objectAnimator
|
||||||
|
android:duration="200"
|
||||||
|
android:propertyName="textColor"
|
||||||
|
android:valueTo="#fff"
|
||||||
|
android:valueFrom="#80ffffff"
|
||||||
|
android:valueType="colorType"/>
|
||||||
|
</set>
|
||||||
|
</item>
|
||||||
|
</selector>
|
|
@ -14,5 +14,6 @@
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:background="@drawable/bg_image_alt_overlay"
|
android:background="@drawable/bg_image_alt_overlay"
|
||||||
android:text="ALT"
|
android:text="ALT"
|
||||||
|
android:stateListAnimator="@animator/alt_badge"
|
||||||
tools:ignore="HardcodedText"
|
tools:ignore="HardcodedText"
|
||||||
tools:showIn="@layout/display_item_photo" />
|
tools:showIn="@layout/display_item_photo" />
|
Loading…
Reference in New Issue