Unify task row pressed state colors

pull/14/head
Sam Bosley 12 years ago
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>

@ -5,7 +5,7 @@
xmlns:astrid="http://schemas.android.com/apk/res/com.timsu.astrid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/list_selector_background"
android:background="?attr/asTaskRowSelector"
android:orientation="horizontal"
android:gravity="center_vertical">

@ -9,7 +9,7 @@
xmlns:astrid="http://schemas.android.com/apk/res/com.timsu.astrid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/list_selector_background"
android:background="?attr/asTaskRowSelector"
android:orientation="horizontal">
<View

@ -42,6 +42,7 @@
<attr name="asListPopoverBg" format="reference"/>
<attr name="asListArrowUp" format="reference"/>
<attr name="asFilterSelectedIcon" format="reference"/>
<attr name="asTaskRowSelector" format="reference" />
<declare-styleable name="ContactsAutoComplete">
<attr name="allowMultiple" format="boolean"/>

@ -47,6 +47,8 @@
<color name="widget_header_legacy_start">#fc1c2334</color>
<color name="widget_header_legacy_end">#fc243455</color>
<color name="widget_body_legacy">#fc1c1c1c</color>
<color name="task_row_bg_dark_pressed">#303030</color>
<color name="task_row_bg_white_pressed">#dde1eb</color>
</resources>

@ -42,6 +42,7 @@
<item name="asListPopoverBg">@drawable/list_popover_bg_white</item>
<item name="asListArrowUp">@drawable/list_arrow_up_white</item>
<item name="asFilterSelectedIcon">@drawable/filter_selected_icon</item>
<item name="asTaskRowSelector">@drawable/task_row_bg_dark</item>
<!-- actionbar-styling -->
<item name="abBackground">@drawable/header_blue</item>
@ -93,6 +94,7 @@
<item name="asListPopoverBg">@drawable/list_popover_bg</item>
<item name="asListArrowUp">@drawable/list_arrow_up</item>
<item name="asFilterSelectedIcon">@drawable/filter_selected_icon_black</item>
<item name="asTaskRowSelector">@drawable/task_row_bg_white</item>
<!-- actionbar-styling -->
<item name="abBackground">@drawable/header_red</item>

Loading…
Cancel
Save