Here I make some example for you...
http://life-as-a-coder.com/_shared/background_state.rar
Take a look at my main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="50dip"
android:background="@drawable/item_background"
android:clickable="true">
<TextView
android:text="Item 1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="35dip"></TextView>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="50dip"
android:background="@drawable/item_background"
android:clickable="true">
<TextView
android:text="Item 2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="35dip"></TextView>
</LinearLayout>
</LinearLayout>
I use LinearLayout for this example. I set android:clickable="true"
to activate the click state...
This can be used in ListView too... just use it on custom row Item...
Sorry for my bad English n grammar