tags:

views:

29

answers:

0

Hi,

I defined the following background.xml in order to set a different background for all children in an ExpandableListView:

<!-- state: when child is not pressed -->
<item 
  android:state_window_focused="true" 
  android:state_enabled="true"
  android:state_selected="true"
  android:state_pressed="false"
  android:drawable="@drawable/child_border"/>
<!-- state: when child pressed -->
<item 
  android:state_window_focused="true" 
  android:state_enabled="true"
  android:state_selected="true"
  android:state_pressed="true"
  android:drawable="@drawable/child_border"/>

When I push on one of the children, then a new activity will be launched.
The problem appears before the new screen is enabled and after the button/child is pressed, meaning I can see the group background.

How should I define a third item in order to set the right background when moving between screens?

Thanks