mirror of https://github.com/tasks/tasks
Unify task row pressed state colors
parent
a420730b18
commit
6c4758b3fb
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
|
||||||
|
|
||||||
|
<item android:state_window_focused="false" android:drawable="@android:color/transparent" />
|
||||||
|
|
||||||
|
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
|
||||||
|
<item android:state_focused="true"
|
||||||
|
android:drawable="@color/task_row_bg_dark_pressed" />
|
||||||
|
<item android:state_pressed="true"
|
||||||
|
android:drawable="@color/task_row_bg_dark_pressed" />
|
||||||
|
<item android:state_focused="false"
|
||||||
|
android:state_pressed="false"
|
||||||
|
android:drawable="@android:color/transparent" />
|
||||||
|
|
||||||
|
</selector>
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
|
||||||
|
|
||||||
|
<item android:state_window_focused="false" android:drawable="@android:color/transparent" />
|
||||||
|
|
||||||
|
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
|
||||||
|
<item android:state_focused="true"
|
||||||
|
android:drawable="@color/task_row_bg_white_pressed" />
|
||||||
|
<item android:state_pressed="true"
|
||||||
|
android:drawable="@color/task_row_bg_white_pressed" />
|
||||||
|
<item android:state_focused="false"
|
||||||
|
android:state_pressed="false"
|
||||||
|
android:drawable="@android:color/transparent" />
|
||||||
|
|
||||||
|
</selector>
|
||||||
Loading…
Reference in New Issue