Skip to content

Instantly share code, notes, and snippets.

@granoeste
Created October 6, 2011 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save granoeste/1266509 to your computer and use it in GitHub Desktop.
Save granoeste/1266509 to your computer and use it in GitHub Desktop.
[Android] ListView Layout
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/list_row_background"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@android:color/transparent"
android:state_pressed="true" />
<item
android:drawable="@android:color/transparent"
android:state_focused="true" />
<item
android:drawable="@android:color/transparent"
android:state_selected="true" />
<item
android:drawable="@android:color/transparent"
android:state_window_focused="false" />
<item
android:drawable="@color/list_row_background_normal" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="list_row_background_normal">#00ffff</color>
</resources>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment