• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3* Copyright (c) 2016, 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
19<!-- The HVAC panel is added as an overlay in the WindowManager, so animating
20the container height would cause janking. The FrameLayout allows us to maintain constant height
21and animate only the children -->
22<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
23             android:layout_width="@dimen/hvac_center_panel_width"
24             android:layout_height="@dimen/car_hvac_panel_full_expanded_height"
25             android:background="@color/hvac_scrim_color">
26    <!-- A dark background that animates in to cover the facet buttons-->
27    <FrameLayout
28            android:id="@+id/hvac_center_panel"
29            android:layout_width="match_parent"
30            android:layout_height="@dimen/car_hvac_panel_full_expanded_height"
31            android:layout_gravity="bottom"
32            android:background="@color/hvac_background_color">
33        <View
34                android:id="@+id/fan_control_bg"
35                android:background="@drawable/hvac_panel_button_bg"
36                android:layout_width="@dimen/hvac_panel_center_group_width"
37                android:layout_height="@dimen/hvac_panel_group_height"
38                android:layout_alignParentTop="true"
39                android:layout_marginTop="@dimen/hvac_panel_row_margin"
40                android:layout_gravity="center_horizontal"
41                android:alpha="0"
42        />
43    </FrameLayout>
44    <RelativeLayout
45            android:id="@+id/fan_control"
46            android:layout_width="@dimen/hvac_center_panel_width"
47            android:layout_height="@dimen/car_hvac_panel_full_expanded_height"
48            android:layout_gravity="center_horizontal">
49        <com.android.car.hvac.ui.HvacPanelRow
50                android:id="@+id/top_row"
51                android:layout_alignParentTop="true"
52                android:layout_centerHorizontal="true"
53                android:layout_width="match_parent"
54                android:layout_height="wrap_content"
55                android:layout_marginTop="@dimen/hvac_panel_row_margin"
56                android:alpha="0"
57                android:layout_marginBottom="@dimen/hvac_panel_row_animation_height_shift">
58            <com.android.car.hvac.ui.ToggleButton
59                    android:id="@+id/recycle_air_button"
60                    android:scaleType="center"
61                    android:layout_width="@dimen/hvac_panel_button_dimen"
62                    android:layout_height="@dimen/hvac_panel_group_height"
63                    android:background="@drawable/hvac_panel_button_bg"/>
64            <View style="@style/HvacSpacerView"/>
65            <RelativeLayout
66                    android:id="@+id/fan_group"
67                    android:layout_width="@dimen/hvac_panel_center_group_width"
68                    android:layout_height="@dimen/hvac_panel_group_height"
69                    android:layout_alignParentTop="true"
70                    android:layout_marginStart="@dimen/hvac_panel_center_group_margin"
71                    android:layout_marginEnd="@dimen/hvac_panel_center_group_margin"
72                    android:layout_centerHorizontal="true">
73
74                <com.android.car.hvac.ui.FanSpeedBar
75                        android:id="@+id/fan_speed_bar"
76                        android:layout_marginTop="@dimen/hvac_fan_speed_top_margin"
77                        android:layout_centerHorizontal="true"
78                        android:layout_alignParentTop="true"
79                        android:layout_width="match_parent"
80                        android:layout_height="wrap_content"/>
81
82                <com.android.car.hvac.ui.FanDirectionButtons
83                        android:id="@+id/fan_direction_buttons"
84                        android:layout_centerHorizontal="true"
85                        android:layout_alignParentBottom="true"
86                        android:layout_marginStart="@dimen/hvac_panel_fan_direction_margin"
87                        android:layout_marginEnd="@dimen/hvac_panel_fan_direction_margin"
88                        android:layout_marginBottom="@dimen/hvac_panel_fan_direction_margin"
89                        android:layout_width="wrap_content"
90                        android:layout_height="wrap_content"/>
91
92            </RelativeLayout>
93            <View style="@style/HvacSpacerView"/>
94            <com.android.car.hvac.ui.ToggleButton
95                    android:id="@+id/ac_button"
96                    android:scaleType="center"
97                    android:layout_width="@dimen/hvac_panel_button_dimen"
98                    android:layout_height="@dimen/hvac_panel_group_height"
99                    android:background="@drawable/hvac_panel_button_bg"/>
100        </com.android.car.hvac.ui.HvacPanelRow>
101
102        <com.android.car.hvac.ui.HvacPanelRow
103                android:id="@+id/bottom_row"
104                android:layout_centerHorizontal="true"
105                android:layout_below="@+id/top_row"
106                android:layout_width="match_parent"
107                android:layout_height="wrap_content"
108                android:alpha="0"
109                android:translationY="@dimen/hvac_panel_row_animation_height_shift"
110                android:layout_marginTop="@dimen/hvac_panel_margin"
111                android:layout_marginBottom="@dimen/hvac_panel_row_margin">
112            <com.android.car.hvac.ui.ToggleButton
113                    android:id="@+id/hvac_master_switch"
114                    android:background="@drawable/hvac_panel_button_bg"
115                    android:layout_marginStart="@dimen/hvac_panel_margin"
116                    style="@style/HvacButton"/>
117            <com.android.car.hvac.ui.SeatWarmerButton
118                    android:id="@+id/left_seat_heater"
119                    android:src="@drawable/ic_seat_heat_off"
120                    android:layout_marginEnd="@dimen/hvac_panel_margin"
121                    style="@style/HvacButton"/>
122            <com.android.car.hvac.ui.ToggleButton
123                    android:id="@+id/front_defroster"
124                    android:background="@drawable/hvac_panel_button_bg"
125                    android:layout_marginEnd="@dimen/hvac_panel_margin"
126                    style="@style/HvacButton"/>
127            <ImageView
128                    android:id="@+id/auto_button"
129                    android:background="@drawable/hvac_panel_button_bg"
130                    android:src="@drawable/ic_auto_off"
131                    android:scaleType="center"
132                    android:layout_gravity="center"
133                    android:layout_width="0dp"
134                    android:layout_weight="1"
135                    style="@style/HvacButton"/>
136            <com.android.car.hvac.ui.ToggleButton
137                    android:id="@+id/rear_defroster"
138                    android:background="@drawable/hvac_panel_button_bg"
139                    android:layout_marginStart="@dimen/hvac_panel_margin"
140                    style="@style/HvacButton"/>
141            <com.android.car.hvac.ui.SeatWarmerButton
142                    android:id="@+id/right_seat_heater"
143                    android:src="@drawable/ic_seat_heat_off"
144                    android:layout_marginStart="@dimen/hvac_panel_margin"
145                    style="@style/HvacButton"/>
146        </com.android.car.hvac.ui.HvacPanelRow>
147    </RelativeLayout>
148</FrameLayout>