1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright 2018 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17
18<resources>
19    <attr name="icon" format="reference"/>
20    <attr name="mute_icon" format="reference"/>
21    <attr name="selectedIcon" format="reference"/>
22    <attr name="intent" format="string"/>
23    <attr name="longIntent" format="string"/>
24    <attr name="selectedAlpha" format="float" />
25    <attr name="unselectedAlpha" format="float" />
26
27    <!-- Custom attributes to configure hvac values -->
28    <declare-styleable name="AnimatedTemperatureView">
29        <attr name="hvacAreaId" format="integer"/>
30        <attr name="hvacPropertyId" format="integer"/>
31        <attr name="hvacTempFormat" format="string"/>
32        <!-- how far away the animations should center around -->
33        <attr name="hvacPivotOffset" format="dimension"/>
34        <attr name="hvacMinValue" format="float"/>
35        <attr name="hvacMaxValue" format="float"/>
36        <attr name="hvacMinText" format="string|reference"/>
37        <attr name="hvacMaxText" format="string|reference"/>
38        <attr name="android:gravity"/>
39        <attr name="android:minEms"/>
40        <attr name="android:textAppearance"/>
41    </declare-styleable>
42
43    <declare-styleable name="SeatTemperatureLevelButton">
44        <attr name="seatTemperatureType">
45            <enum name="heating" value="1"/>
46            <enum name="cooling" value="-1"/>
47        </attr>
48        <!-- List of drawables that will be shown when the seat heat level button is clicked.
49             This list should have exactly R.integer.hvac_seat_heat_level_count items.
50             The first item should have the "off" drawable. -->
51        <attr name="seatTemperatureIconDrawableList" format="reference"/>
52    </declare-styleable>
53
54    <!-- Allow for custom attribs to be added to a nav button -->
55    <declare-styleable name="CarSystemBarButton">
56        <!-- intent to start when button is click -->
57        <attr name="intent" />
58        <!-- intent to start when a long press has happened -->
59        <attr name="longIntent" />
60        <!-- start the intent as a broad cast instead of an activity if true-->
61        <attr name="broadcast" format="boolean"/>
62        <!-- Alpha value to used when in selected state.  Defaults 1f  -->
63        <attr name="selectedAlpha" />
64        <!-- Alpha value to used when in un-selected state.  Defaults 0.7f  -->
65        <attr name="unselectedAlpha" />
66        <!-- icon to be rendered when in selected state -->
67        <attr name="selectedIcon" />
68        <!-- icon to be rendered (drawable) -->
69        <attr name="icon"/>
70        <!-- categories that will be added as extras to the fired intents -->
71        <attr name="categories" format="string"/>
72        <!-- package names that will be added as extras to the fired intents -->
73        <attr name="packages" format="string" />
74        <!-- componentName names that will be used for detecting selected state -->
75        <attr name="componentNames" format="string" />
76        <!-- whether to highlight the button when selected. Defaults false -->
77        <attr name="showMoreWhenSelected" format="boolean" />
78        <!-- whether to highlight the button when selected. Defaults false -->
79        <attr name="highlightWhenSelected" format="boolean" />
80        <!-- whether to show the icon of the app currently associated this button's role. Only
81             relevant for buttons associated to specific roles (e.g.: AssistantButton).
82             Defaults false -->
83        <attr name="useDefaultAppIconForRole" format="boolean"/>
84        <!-- whether to clear the back stack when this button is pressed. Only relevant for buttons
85             that have declared an intent that isn't used as a broadcast
86             (i.e. CarSystemBarButton_intent is defined, CarSystemBarButton_broadcast is false).
87             Defaults false. -->
88        <attr name="clearBackStack" format="boolean"/>
89        <!-- whether to toggle selected state when button is clicked. Defaults false -->
90        <attr name="toggleSelected" format="boolean" />
91    </declare-styleable>
92
93    <!-- Custom attribute for the CarSystemBarElement interface - implementing classes must opt in
94         to consuming these attributes within their constructor and applying appropriately. -->
95    <declare-styleable name="CarSystemBarElement">
96        <!-- Class name of the CarSystemBarElementController that should be attached to this view -->
97        <attr name="controller" format="string"/>
98        <!-- Attribute for specifying the system bar disable flag of a supporting element view.
99             This corresponds to the StatusBarManager.DisableFlags. -->
100        <attr name="systemBarDisableFlags" format="integer">
101            <flag name="none" value="0"/>
102            <flag name="expand" value="1"/>
103            <flag name="notificationIcons" value="2"/>
104            <flag name="notificationAlerts" value="4"/>
105            <flag name="systemInfo" value="8"/>
106            <flag name="home" value="16"/>
107            <flag name="recent" value="32"/>
108            <flag name="back" value="64"/>
109            <flag name="clock" value="128"/>
110            <flag name="search" value="256"/>
111            <flag name="ongoingCallChip" value="512"/>
112        </attr>
113        <!-- Attribute for specifying the system bar disable flag of a supporting element view.
114             This corresponds to the StatusBarManager.Disable2Flags. -->
115        <attr name="systemBarDisable2Flags" format="integer">
116            <flag name="none" value="0"/>
117            <flag name="quickSettings" value="1"/>
118            <flag name="systemIcons" value="2"/>
119            <flag name="notificationShade" value="4"/>
120            <flag name="globalActions" value="8"/>
121            <flag name="rotateSuggestions" value="16"/>
122        </attr>
123        <!-- Attribute for specifying if this element should be disabled when in the
124             LOCK_TASK_MODE_LOCKED state -->
125        <attr name="disableForLockTaskModeLocked" format="boolean"/>
126    </declare-styleable>
127
128    <declare-styleable name="CarSystemBarPanelButtonView">
129        <!-- REQUIRED: Layout resource for the panel -->
130        <attr name="panelLayoutRes" format="reference"/>
131        <!--  Width of the panel. If not specified, will use default width value -->
132        <attr name="panelWidthRes" format="reference"/>
133        <!-- X Offset value for the panel location relative to the anchor view -->
134        <attr name="xOffset" format="integer"/>
135        <!-- Y Offset value for the panel location relative to the anchor view -->
136        <attr name="yOffset" format="integer"/>
137        <!-- Gravity of the panel relative to the anchor view - uses same flag format as android:gravity -->
138        <attr name="gravity" format="integer">
139            <flag name="top" value="0x30" />
140            <flag name="bottom" value="0x50" />
141            <flag name="left" value="0x03" />
142            <flag name="right" value="0x05" />
143            <flag name="center_vertical" value="0x10" />
144            <flag name="fill_vertical" value="0x70" />
145            <flag name="center_horizontal" value="0x01" />
146            <flag name="fill_horizontal" value="0x07" />
147            <flag name="center" value="0x11" />
148            <flag name="fill" value="0x77" />
149            <flag name="clip_vertical" value="0x80" />
150            <flag name="clip_horizontal" value="0x08" />
151            <flag name="start" value="0x00800003" />
152            <flag name="end" value="0x00800005" />
153        </attr>
154        <!-- Whether the panel should be disabled while driving - defaults to false -->
155        <attr name="disabledWhileDriving" format="boolean"/>
156        <!-- Whether the panel should be disabled while unprovisioned - defaults to false -->
157        <attr name="disabledWhileUnprovisioned" format="boolean"/>
158        <!-- Whether the panel should be shown as a dropdown relative to the anchor view or not
159             (making it relative to the screen with offsets and gravity) - defaults to true -->
160        <attr name="showAsDropDown" format="boolean"/>
161    </declare-styleable>
162
163    <!-- Custom attributes to configure HVAC values -->
164    <declare-styleable name="HvacView">
165        <attr name="hvacAreaId" format="integer"/>
166        <attr name="hvacPropertyId" format="integer"/>
167        <attr name="hvacTempFormat" format="string"/>
168        <attr name="hvacToggleOnButtonDrawable" format="reference"/>
169        <attr name="hvacToggleOffButtonDrawable" format="reference"/>
170        <!-- Whether the given HvacView must be turned off if the HVAC Auto mode is on.
171               Defaults to false. -->
172        <attr name="hvacDisableViewIfAutoOn" format="boolean" />
173    </declare-styleable>
174
175    <declare-styleable name="HvacIntegerToggleButton">
176        <attr name="invalidValue" format="integer"/>
177        <attr name="onValue" format="integer"/>
178        <attr name="offValue" format="integer"/>
179        <!-- Whether the given HvacView can be toggled off. This attribute can be useful when a
180             group of HvacToggleButtons should be used in a radio button like manner (i.e. only one
181             can be selected at a time, an option MUST be selected).
182               Defaults to false. -->
183        <attr name="preventToggleOff" format="boolean" />
184    </declare-styleable>
185
186    <declare-styleable name="carVolumeItems"/>
187    <declare-styleable name="carVolumeItems_item">
188        <!-- Align with AudioAttributes.USAGE_* -->
189        <attr name="usage">
190            <enum name="unknown" value="0"/>
191            <enum name="media" value="1"/>
192            <enum name="voice_communication" value="2"/>
193            <enum name="voice_communication_signalling" value="3"/>
194            <enum name="alarm" value="4"/>
195            <enum name="notification" value="5"/>
196            <enum name="notification_ringtone" value="6"/>
197            <enum name="notification_communication_request" value="7"/>
198            <enum name="notification_communication_instant" value="8"/>
199            <enum name="notification_communication_delayed" value="9"/>
200            <enum name="notification_event" value="10"/>
201            <enum name="assistance_accessibility" value="11"/>
202            <enum name="assistance_navigation_guidance" value="12"/>
203            <enum name="assistance_sonification" value="13"/>
204            <enum name="game" value="14"/>
205            <!-- hidden, do not use -->
206            <!-- enum name="virtual_source" value="15"/ -->
207            <enum name="assistant" value="16"/>
208            <enum name="call_assistant" value="17"/>
209            <enum name="emergency" value="1000"/>
210            <enum name="safety" value="1001"/>
211            <enum name="vehicle_status" value="1002"/>
212            <enum name="announcement" value="1003"/>
213        </attr>
214
215        <!-- Icon resource ids to render on UI -->
216        <attr name="icon" />
217        <attr name="mute_icon" />
218    </declare-styleable>
219
220    <declare-styleable name="SystemUIQCView">
221        <attr name="remoteQCProvider" format="string"/>
222        <attr name="localQCProvider" format="string"/>
223    </declare-styleable>
224
225    <declare-styleable name="QCFooterButton">
226        <attr name="intent" format="string"/>
227        <attr name="disableWhileDriving" format="boolean"/>
228    </declare-styleable>
229
230    <declare-styleable name="QCFooterView">
231        <attr name="intent" format="string"/>
232        <attr name="disableWhileDriving" format="boolean"/>
233    </declare-styleable>
234
235    <declare-styleable name="PinPadView">
236        <attr name="layout" format="reference"/>
237    </declare-styleable>
238
239    <!-- Attributes used for showing displaycompat toolbar on system bars. -->
240    <declare-styleable name="CarDisplayCompatSystemBarView">
241        <attr name="default_layout" format="reference"/>
242        <attr name="displaycompat_layout" format="reference"/>
243        <attr name="displaycompat_side" format="integer">
244            <enum name="left" value="1"/>
245            <enum name="right" value="2"/>
246        </attr>
247    </declare-styleable>
248</resources>
249