1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (C) 2008 The Android Open Source Project Licensed under the
3 Apache License, Version 2.0 (the "License"); you may not use this file except
4 in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
5 Unless required by applicable law or agreed to in writing, software distributed
6 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
7 OR CONDITIONS OF ANY KIND, either express or implied. See the License for
8 the specific language governing permissions and limitations under the License. -->
10 <selector xmlns:android="http://schemas.android.com/apk/res/android">
12 <item android:state_window_focused="false" android:drawable="@android:color/transparent" />
14 <!-- Even though these two point to the same resource, have two states so
15 the drawable will invalidate itself when coming out of pressed state. -->
16 <item android:state_focused="true" android:state_enabled="false"
17 android:state_pressed="true" android:drawable="@drawable/list_selector_background_disabled" />
18 <item android:state_focused="true" android:state_enabled="false"
19 android:drawable="@drawable/list_selector_background_disabled" />
21 <item android:state_focused="true" android:state_pressed="true"
22 android:drawable="@drawable/list_selector_background_transition" />
23 <item android:state_focused="false" android:state_pressed="true"
24 android:drawable="@drawable/list_selector_background_transition" />
26 <item android:state_focused="true"
27 android:drawable="@drawable/list_selector_background_focus" />
29 <!-- !!hack!! to fill StateListDrawable.mStateListState with exactly 10
30 items otherwise it will throw NPE on Android 1.6 -->
32 <item android:animationCache="true"
33 android:drawable="@android:color/transparent" />
35 <item android:animationCache="false"
36 android:drawable="@android:color/transparent" />
38 <item android:alwaysDrawnWithCache="false"
39 android:drawable="@android:color/transparent" />
41 <item android:alwaysDrawnWithCache="true"
42 android:drawable="@android:color/transparent" />