Ok ive made the change but the normal focus doesnt seem to be working, 
here's the expand_custom_row_group_layout:

*<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>*
*
*
Here's the expandable_group_item:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android";>
         
               <item  
                   android:state_window_focused="false"
                   android:drawable="@android:color/transparent"/> 
<!-- Even though these two point to the same resource, have two states so 
the drawable will invalidate itself when coming out of pressed state. -->
<item 
    android:drawable="@android:color/transparent" 
    android:state_pressed="true" 
    android:state_enabled="false" 
    android:state_focused="true"/> 
 <item 
    android:drawable="@android:color/transparent" 
    android:state_enabled="false" 
    android:state_focused="true"/> 
<item 
    android:drawable="@android:color/transparent" 
    android:state_pressed="true" 
    android:state_focused="true"/> 
<item 
    android:drawable="@android:color/transparent" 
    android:state_pressed="true" 
    android:state_focused="false"/> 
<item 
 android:drawable="@android:color/transparent" 
    android:state_focused="true"/>
*<!-- the default item -->*
        <item 
            android:drawable="@+drawable/gradient_dialog_header" />
</selector>

Am i missing something the in selector file?

regards,

On Monday, February 27, 2012 3:41:04 PM UTC, Kostya Vasilyev wrote:
>
>  On 02/27/2012 07:25 PM, Bluemercury wrote: 
>
> Hi again Kostya, seems that the cursor focus isnt working althought that's 
> not the most important thing it still is default behaviour so im wondering 
> why it doesnt work. Also the extra layout was something like this?: 
>
>  
> <LinearLayout android:id="@+id/LinearLayout01"
>  android:layout_width="fill_parent" 
>  android:layout_height="45dip"
>  
> xmlns:android="http://schemas.android.com/apk/res/android";<http://schemas.android.com/apk/res/android>
>  *android:background="@drawable/expandable_group_item">*
>  *<LinearLayout*
> *    android:layout_width="fill_parent" *
> * android:layout_height="fill_parent"*
> * android:duplicateParentState="true">*
>  
>
> Right - that's the backgrounds "stepping on each other" that I mentioned 
> earlier.
>
> The extra layout should be set up like this:
>
> <LinearLayout android:id="@+id/LinearLayout01"
> android:layout_width="fill_parent" 
> android:layout_height="45dip"
> xmlns:android="http://schemas.android.com/apk/res/android";<http://schemas.android.com/apk/res/android>
> >
> <LinearLayout
>    android:layout_width="fill_parent" 
> android:layout_height="fill_parent"
> *android:background="@drawable/expandable_group_item"*
> android:duplicateParentState="true">
>
> The top-level layout will have its background modified by the expandable 
> list view, to show selected / pressed state.
>
> The second layout has your custom color / gradient, and because it becomes 
> transparent when the item is selected / pressed, the background of the 
> top-level item will show through.
>
> -- Kostya
>
>  

-- 
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