• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2  ~ Copyright (C) 2022 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<com.android.systemui.car.hvac.HvacPanelView
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:app="http://schemas.android.com/apk/res-auto"
20    xmlns:systemui="http://schemas.android.com/apk/res-auto"
21    android:id="@+id/hvac_panel"
22    android:orientation="vertical"
23    android:layout_width="match_parent"
24    android:layout_height="@dimen/hvac_panel_full_expanded_height"
25    android:background="@drawable/hvac_background">
26    <androidx.constraintlayout.widget.Guideline
27        android:id="@+id/top_guideline"
28        android:layout_width="wrap_content"
29        android:layout_height="wrap_content"
30        android:orientation="horizontal"
31        app:layout_constraintGuide_begin="@dimen/hvac_panel_top_padding"/>
32    <androidx.constraintlayout.widget.Guideline
33        android:id="@+id/bottom_guideline"
34        android:layout_width="wrap_content"
35        android:layout_height="wrap_content"
36        android:orientation="horizontal"
37        app:layout_constraintGuide_end="@dimen/hvac_panel_bottom_padding"/>
38    <!--  NOTE: HVAC property ID's can be found in VehiclePropertyIds.java, and the area
39        ID's depend on each OEM's VHAL implementation. -->
40    <com.android.systemui.car.hvac.referenceui.BackgroundAdjustingTemperatureControlView
41        android:id="@+id/driver_hvac"
42        android:layout_width="wrap_content"
43        android:layout_height="wrap_content"
44        app:layout_constraintLeft_toLeftOf="parent"
45        app:layout_constraintTop_toTopOf="parent"
46        app:layout_constraintBottom_toBottomOf="parent"
47        systemui:hvacAreaId="49">
48        <include layout="@layout/hvac_temperature_bar_overlay"/>
49    </com.android.systemui.car.hvac.referenceui.BackgroundAdjustingTemperatureControlView>
50    <com.android.systemui.car.hvac.toggle.HvacBooleanToggleButton
51        android:id="@+id/recycle_air_button"
52        android:layout_width="@dimen/hvac_panel_button_dimen"
53        android:layout_height="@dimen/hvac_panel_group_height"
54        android:background="@drawable/hvac_panel_button_bg"
55        app:layout_constraintTop_toBottomOf="@+id/top_guideline"
56        app:layout_constraintLeft_toRightOf="@+id/driver_hvac"
57        app:layout_constraintRight_toLeftOf="@+id/fan_control"
58        systemui:hvacAreaId="117"
59        systemui:hvacPropertyId="354419976"
60        systemui:hvacDisableViewIfAutoOn="true"
61        systemui:hvacToggleOnButtonDrawable="@drawable/ic_recycle_air_on"
62        systemui:hvacToggleOffButtonDrawable="@drawable/ic_recycle_air_off"/>
63    <LinearLayout
64        android:id="@+id/fan_control"
65        android:background="@drawable/hvac_panel_button_bg"
66        android:layout_width="@dimen/hvac_fan_speed_bar_width"
67        android:layout_height="@dimen/hvac_panel_group_height"
68        app:layout_constraintTop_toBottomOf="@+id/top_guideline"
69        app:layout_constraintLeft_toRightOf="@+id/recycle_air_button"
70        app:layout_constraintRight_toLeftOf="@+id/ac_button"
71        android:layout_centerVertical="true"
72        android:layout_centerHorizontal="true"
73        android:orientation="vertical">
74        <com.android.systemui.car.hvac.referenceui.FanSpeedBar
75            android:layout_weight="1"
76            android:layout_width="match_parent"
77            android:layout_height="0dp"/>
78        <com.android.systemui.car.hvac.referenceui.FanDirectionButtons
79            android:layout_weight="1"
80            android:layout_width="match_parent"
81            android:layout_height="0dp"
82            android:orientation="horizontal"
83            android:layoutDirection="ltr"/>
84    </LinearLayout>
85    <com.android.systemui.car.hvac.toggle.HvacBooleanToggleButton
86        android:id="@+id/ac_button"
87        android:layout_width="@dimen/hvac_panel_button_dimen"
88        android:layout_height="@dimen/hvac_panel_group_height"
89        android:background="@drawable/hvac_panel_button_bg"
90        app:layout_constraintTop_toBottomOf="@+id/top_guideline"
91        app:layout_constraintLeft_toRightOf="@+id/fan_control"
92        app:layout_constraintRight_toLeftOf="@+id/passenger_hvac"
93        systemui:hvacAreaId="117"
94        systemui:hvacPropertyId="354419973"
95        systemui:hvacDisableViewIfAutoOn="true"
96        systemui:hvacToggleOnButtonDrawable="@drawable/ic_ac_on"
97        systemui:hvacToggleOffButtonDrawable="@drawable/ic_ac_off"/>
98    <com.android.systemui.car.hvac.referenceui.BackgroundAdjustingTemperatureControlView
99        android:id="@+id/passenger_hvac"
100        android:layout_width="wrap_content"
101        android:layout_height="wrap_content"
102        app:layout_constraintRight_toRightOf="parent"
103        app:layout_constraintTop_toTopOf="parent"
104        app:layout_constraintBottom_toBottomOf="parent"
105        systemui:hvacAreaId="68">
106        <include layout="@layout/hvac_temperature_bar_overlay"/>
107    </com.android.systemui.car.hvac.referenceui.BackgroundAdjustingTemperatureControlView>
108    <com.android.systemui.car.hvac.SeatTemperatureLevelButton
109        android:id="@+id/seat_heat_level_button_left"
110        android:background="@drawable/hvac_panel_button_bg"
111        style="@style/HvacButton"
112        app:layout_constraintLeft_toRightOf="@+id/driver_hvac"
113        app:layout_constraintRight_toLeftOf="@+id/fan_control"
114        app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline"
115        systemui:hvacAreaId="1"
116        systemui:seatTemperatureType="heating"
117        systemui:seatTemperatureIconDrawableList="@array/hvac_heated_seat_default_icons"/>
118    <com.android.systemui.car.hvac.toggle.HvacBooleanToggleButton
119        android:id="@+id/ac_master_switch"
120        android:background="@drawable/hvac_panel_button_bg"
121        android:scaleType="center"
122        style="@style/HvacButton"
123        app:layout_constraintHorizontal_chainStyle="packed"
124        app:layout_constraintLeft_toRightOf="@+id/seat_heat_level_button_left"
125        app:layout_constraintRight_toLeftOf="@+id/defroster_button"
126        app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline"
127        systemui:hvacAreaId="117"
128        systemui:hvacPropertyId="354419984"
129        systemui:hvacToggleOnButtonDrawable="@drawable/ac_master_switch_on"
130        systemui:hvacToggleOffButtonDrawable="@drawable/ac_master_switch_off"/>
131    <com.android.systemui.car.hvac.toggle.HvacBooleanToggleButton
132        android:id="@+id/defroster_button"
133        android:background="@drawable/hvac_panel_button_bg"
134        style="@style/HvacButton"
135        app:layout_constraintLeft_toRightOf="@+id/ac_master_switch"
136        app:layout_constraintRight_toLeftOf="@+id/auto_button"
137        app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline"
138        systemui:hvacAreaId="1"
139        systemui:hvacPropertyId="320865540"
140        systemui:hvacToggleOnButtonDrawable="@drawable/ic_front_defroster_on"
141        systemui:hvacToggleOffButtonDrawable="@drawable/ic_front_defroster_off"/>
142    <com.android.systemui.car.hvac.toggle.HvacBooleanToggleButton
143        android:id="@+id/auto_button"
144        android:background="@drawable/hvac_panel_button_bg"
145        systemui:hvacAreaId="117"
146        systemui:hvacPropertyId="354419978"
147        android:scaleType="center"
148        android:layout_gravity="center"
149        style="@style/HvacButton"
150        app:layout_constraintLeft_toRightOf="@+id/defroster_button"
151        app:layout_constraintRight_toLeftOf="@+id/rear_defroster_button"
152        app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline"
153        systemui:hvacToggleOnButtonDrawable="@drawable/ic_auto_on"
154        systemui:hvacToggleOffButtonDrawable="@drawable/ic_auto_off"/>
155    <com.android.systemui.car.hvac.toggle.HvacBooleanToggleButton
156        android:id="@+id/rear_defroster_button"
157        android:background="@drawable/hvac_panel_button_bg"
158        style="@style/HvacButton"
159        systemui:hvacAreaId="2"
160        systemui:hvacPropertyId="320865540"
161        app:layout_constraintLeft_toRightOf="@+id/auto_button"
162        app:layout_constraintRight_toLeftOf="@+id/seat_heat_level_button_right"
163        app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline"
164        systemui:hvacToggleOnButtonDrawable="@drawable/ic_rear_defroster_on"
165        systemui:hvacToggleOffButtonDrawable="@drawable/ic_rear_defroster_off"/>
166    <com.android.systemui.car.hvac.SeatTemperatureLevelButton
167        android:id="@+id/seat_heat_level_button_right"
168        android:background="@drawable/hvac_panel_button_bg"
169        style="@style/HvacButton"
170        app:layout_constraintRight_toLeftOf="@+id/passenger_hvac"
171        app:layout_constraintLeft_toRightOf="@+id/fan_control"
172        app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline"
173        systemui:hvacAreaId="4"
174        systemui:seatTemperatureType="heating"
175        systemui:seatTemperatureIconDrawableList="@array/hvac_heated_seat_default_icons"/>
176
177    <FrameLayout
178        android:id="@+id/handle_bar"
179        android:layout_width="match_parent"
180        android:layout_height="wrap_content"
181        android:padding="@dimen/hvac_panel_handle_bar_frame_padding">
182        <include layout="@layout/hvac_panel_handle_bar"/>
183    </FrameLayout>
184
185</com.android.systemui.car.hvac.HvacPanelView>