<?xml version="1.0" encoding="utf-8"?> <!-- * Copyright (c) 2016, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <!-- The HVAC panel is added as an overlay in the WindowManager, so animating the container height would cause janking. The FrameLayout allows us to maintain constant height and animate only the children --> <com.android.car.hvac.ui.TemperatureBarOverlay xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="@dimen/temperature_bar_width_expanded" android:layout_height="@dimen/car_hvac_panel_full_expanded_height"> <TextView android:id="@+id/floating_temperature_text" android:textColor="@color/hvac_temperature_floating_text_color" android:textSize="@dimen/temperature_bar_floating_text_size" android:layout_gravity="bottom" android:layout_marginBottom="@dimen/temperature_bar_floating_text_bottom_margin" android:layout_marginLeft="@dimen/hvac_floating_text_left_margin" style="@style/HvacTemperature"/> <TextView android:id="@+id/temperature_off_text" android:background="@drawable/hvac_off_text_bg" android:textColor="@color/hvac_background_color" android:textSize="@dimen/temperature_bar_off_text_size" android:textStyle="bold" android:visibility="gone" android:includeFontPadding="false" style="@style/HvacTemperatureOff"/> <!-- The collapseable temperature bar --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/temperature_bar" android:layout_gravity="center_horizontal" android:layout_width="@dimen/temperature_bar_width_collapsed" android:layout_height="@dimen/temperature_bar_collapsed_height" android:background="@drawable/temperature_bar_background"> <ImageView android:id="@+id/increase_button" android:layout_marginTop="@dimen/temperature_bar_icon_margin" android:layout_gravity="top" android:src="@drawable/ic_increase_icon" style="@style/HvacTemperatureControlIcon"/> <TextView android:id="@+id/temperature_text" android:layout_gravity="center_vertical" style="@style/HvacTemperature"/> <ImageView android:id="@+id/decrease_button" android:layout_marginBottom="@dimen/temperature_bar_icon_margin" android:layout_gravity="bottom" android:src="@drawable/ic_decrease_icon" style="@style/HvacTemperatureControlIcon"/> </FrameLayout> <ImageView android:id="@+id/close_button" android:src="@drawable/ic_down_arrow" android:visibility="gone" android:layout_gravity="center_horizontal|bottom" android:scaleType="center" android:layout_marginBottom="@dimen/hvac_close_button_bottom_margin" android:layout_height="@dimen/temperature_bar_close_icon_dimen" android:layout_width="@dimen/temperature_bar_close_icon_dimen"/> </com.android.car.hvac.ui.TemperatureBarOverlay>