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 20 the container height would cause janking. The FrameLayout allows us to maintain constant height 21 and animate only the children --> 22 <com.android.car.hvac.ui.TemperatureBarOverlay 23 xmlns:android="http://schemas.android.com/apk/res/android" 24 android:layout_width="@dimen/temperature_bar_width_expanded" 25 android:layout_height="@dimen/car_hvac_panel_full_expanded_height"> 26 <TextView 27 android:id="@+id/floating_temperature_text" 28 android:textColor="@color/hvac_temperature_floating_text_color" 29 android:textSize="@dimen/temperature_bar_floating_text_size" 30 android:layout_gravity="bottom" 31 android:layout_marginBottom="@dimen/temperature_bar_floating_text_bottom_margin" 32 android:layout_marginLeft="@dimen/hvac_floating_text_left_margin" 33 style="@style/HvacTemperature"/> 34 <TextView 35 android:id="@+id/temperature_off_text" 36 android:background="@drawable/hvac_off_text_bg" 37 android:textColor="@color/hvac_background_color" 38 android:textSize="@dimen/temperature_bar_off_text_size" 39 android:textStyle="bold" 40 android:visibility="gone" 41 android:includeFontPadding="false" 42 style="@style/HvacTemperatureOff"/> 43 <!-- The collapseable temperature bar --> 44 <FrameLayout 45 xmlns:android="http://schemas.android.com/apk/res/android" 46 android:id="@+id/temperature_bar" 47 android:layout_gravity="center_horizontal" 48 android:layout_width="@dimen/temperature_bar_width_collapsed" 49 android:layout_height="@dimen/temperature_bar_collapsed_height" 50 android:background="@drawable/temperature_bar_background"> 51 <ImageView 52 android:id="@+id/increase_button" 53 android:layout_marginTop="@dimen/temperature_bar_icon_margin" 54 android:layout_gravity="top" 55 android:src="@drawable/ic_increase_icon" 56 style="@style/HvacTemperatureControlIcon"/> 57 <TextView 58 android:id="@+id/temperature_text" 59 android:layout_gravity="center_vertical" 60 style="@style/HvacTemperature"/> 61 <ImageView 62 android:id="@+id/decrease_button" 63 android:layout_marginBottom="@dimen/temperature_bar_icon_margin" 64 android:layout_gravity="bottom" 65 android:src="@drawable/ic_decrease_icon" 66 style="@style/HvacTemperatureControlIcon"/> 67 </FrameLayout> 68 <ImageView 69 android:id="@+id/close_button" 70 android:src="@drawable/ic_down_arrow" 71 android:visibility="gone" 72 android:layout_gravity="center_horizontal|bottom" 73 android:scaleType="center" 74 android:layout_marginBottom="@dimen/hvac_close_button_bottom_margin" 75 android:layout_height="@dimen/temperature_bar_close_icon_dimen" 76 android:layout_width="@dimen/temperature_bar_close_icon_dimen"/> 77 </com.android.car.hvac.ui.TemperatureBarOverlay>