spinner_textfield_background_material.xml revision 07ac7fbcabd381793ba0be2453deb4cf7b85f0bb
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2014 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<inset xmlns:android="http://schemas.android.com/apk/res/android"
18       android:inset="@dimen/control_inset_material">
19    <selector android:autoMirrored="true">
20        <item android:state_enabled="false">
21            <layer-list android:paddingMode="stack">
22                <item>
23                    <nine-patch android:src="@drawable/textfield_activated_mtrl_alpha"
24                        android:tint="?attr/colorControlActivated"
25                        android:alpha="?attr/disabledAlpha" />
26                </item>
27                <item>
28                    <nine-patch android:src="@drawable/spinner_mtrl_am_alpha"
29                        android:tint="?attr/colorControlActivated"
30                        android:alpha="?attr/disabledAlpha" />
31                </item>
32            </layer-list>
33        </item>
34        <item android:state_pressed="false" android:state_focused="false">
35            <layer-list android:paddingMode="stack">
36                <item>
37                    <nine-patch android:src="@drawable/textfield_default_mtrl_alpha"
38                        android:tint="?attr/colorControlNormal" />
39                </item>
40                <item>
41                    <nine-patch android:src="@drawable/spinner_mtrl_am_alpha"
42                        android:tint="?attr/colorControlNormal" />
43                </item>
44            </layer-list>
45        </item>
46        <item>
47            <layer-list android:paddingMode="stack">
48                <item>
49                    <nine-patch android:src="@drawable/textfield_activated_mtrl_alpha"
50                        android:tint="?attr/colorControlActivated" />
51                </item>
52                <item>
53                    <nine-patch android:src="@drawable/spinner_mtrl_am_alpha"
54                        android:tint="?attr/colorControlActivated" />
55                </item>
56            </layer-list>
57        </item>
58    </selector>
59</inset>
60