Hi All,

I want to change the default highlight color for list.But it doesn't
work, the allow list area has set to the high-light color I want to
set. Any thing wrong with my code?

THe layout code is as follows:
<LinearLayout android:id="@+id/list_panel"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_weight="1"
            android:layout_gravity="fill"
            android:layout_marginBottom="20px"
                android:background="@drawable/list_bg">
        <ListView android:id="@+id/android:list"
                        android:divider="@drawable/content_bg"
                        android:layout_width="fill_parent"
                        android:dividerHeight="2px"
                        android:listSelector="@drawable/listselect"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:scrollbars="none"/>
                <TextView android:id="@+id/android:empty"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="No result!"/>
     </LinearLayout>

The listselect.xml is:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android";>
        <item android:state_pressed="true"
          android:drawable="@drawable/list_focus"/>
        <item android:state_selected="true"
          android:drawable="@drawable/list_focus"/>
    <item android:state_focused="true"
          android:drawable="@drawable/list_focus"/>
    <item android:drawable="@drawable/list_bg"/>
</selector>

Thanks!

Cindy

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to