Okay, even after those changes i still get the focus color behind the gradient background. i just putted round corners in the gradient and i can see it behind....let me show what i have now then:
*expandable_group_item.xml:* <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_focused="true" android:drawable="@android:color/transparent"/> <item android:state_pressed="true" android:drawable="@android:color/transparent" /> <!-- the default item --> <item android:drawable="@+drawable/gradient_dialog_header" /> </selector> *expand_custom_row_group_layout.xml:* <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="45dip"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/expandable_group_item" android:duplicateParentState="true"> <TextView android:id="@+id/tvGroup" android:layout_width="fill_parent" android:layout_height="45dip" android:text="Groups" android:gravity="center_vertical|right" android:paddingLeft="5dip" android:paddingRight="5dip" android:textColor="#ffffffff" android:textStyle="bold" android:textSize="17dip"> </TextView> </LinearLayout> </LinearLayout> *gradient_dialog_header:* <?xml version="1.0" encoding="utf-8"?> <!-- gradient used for grey header view element to match original android default type--> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#C4D82D" android:endColor="#99A923" android:angle="90" /> <corners android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp" android:topLeftRadius="7dp" android:topRightRadius="7dp" /> </shape> regards, On Monday, February 27, 2012 3:58:51 PM UTC, Kostya Vasilyev wrote: > > On 02/27/2012 07:53 PM, Bluemercury wrote: > > > Am i missing something the in selector file? > > regards, > > > Yes - the selector should only use @andorid:color/transparent for > state_pressed or state_focused true. Something like: > > <?xml version="1.0" encoding="utf-8"?> > <selector > xmlns:android="http://schemas.android.com/apk/res/android"<http://schemas.android.com/apk/res/android> > > > <item > android:state_focused="true" > android:drawable="@android:color/transparent"/> > <item > android:state_pressed="true" > android:drawable="@android:color/transparent" /> > *<!-- the default item -->* > <item > android:drawable="@+drawable/gradient_dialog_header" /> > </selector> > > This is it, no other items or states. > > What this does is - lets the framework's list item background show through > when the item is pressed or focused, and shows your own gradient when it's > not. > > -- Kostya > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en