~singpolyma/cheogram-android

dce0d827a48fba282480df3a6a576a6b70236a26 — Stephen Paul Weber 1 year, 3 months ago 5ea0c8c
Use a list item background that can handle being selected
2 files changed, 11 insertions(+), 1 deletions(-)

A src/cheogram/res/drawable/list_choice.xml
M src/main/res/layout/simple_list_item.xml
A src/cheogram/res/drawable/list_choice.xml => src/cheogram/res/drawable/list_choice.xml +9 -0
@@ 0,0 1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
    android:enterFadeDuration="@android:integer/config_shortAnimTime"
    android:exitFadeDuration="@android:integer/config_shortAnimTime">

    <item android:state_pressed="true" android:drawable="@color/grey500" />
    <item android:state_activated="true" android:drawable="@color/grey500" />
    <item android:drawable="@android:color/transparent" />
</selector>

M src/main/res/layout/simple_list_item.xml => src/main/res/layout/simple_list_item.xml +2 -1
@@ 22,4 22,5 @@
    android:paddingLeft="8dp"
    android:paddingRight="8dp"
    android:textAppearance="@style/TextAppearance.Conversations.Body1"
    android:textColor="?attr/edit_text_color" />
    android:textColor="?attr/edit_text_color"
    android:background="@drawable/list_choice" />