1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2016 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 <FrameLayout 17 xmlns:android="http://schemas.android.com/apk/res/android" 18 android:layout_width="match_parent" 19 android:layout_height="match_parent" 20 android:paddingTop="@dimen/lens_header_height" > 21 22 <!-- This LinearLayout is clickable so that clicks do not fall through to the underlying 23 fragment. --> 24 <LinearLayout 25 android:background="@color/car_card" 26 android:clickable="true" 27 android:layout_width="match_parent" 28 android:layout_height="match_parent" 29 android:paddingTop="@dimen/manual_tuner_top_padding"> 30 31 <FrameLayout 32 android:layout_marginTop="@dimen/manual_tuner_dialpad_top_margin" 33 android:layout_width="0dp" 34 android:layout_height="match_parent" 35 android:layout_weight="1" > 36 37 <!-- This FrameLayout ensures that the back button is centered within the 38 manual_tuner_back_button_container_size despite the button's touch target 39 being smaller. --> 40 <FrameLayout 41 android:layout_marginTop="@dimen/manual_tuner_back_button_top_margin" 42 android:layout_gravity="start|top" 43 android:layout_width="@dimen/manual_tuner_back_button_container_size" 44 android:layout_height="@dimen/manual_tuner_back_button_container_size"> 45 46 <ImageView 47 android:id="@+id/exit_manual_tuner_button" 48 android:background="@drawable/radio_control_background" 49 android:layout_gravity="center" 50 android:layout_width="@dimen/stream_button_size" 51 android:layout_height="@dimen/stream_button_size" 52 android:scaleType="center" 53 android:src="@drawable/ic_down_outlined" /> 54 </FrameLayout> 55 56 <include 57 android:layout_gravity="center_horizontal" 58 android:layout_width="wrap_content" 59 android:layout_height="wrap_content" 60 layout="@layout/manual_tuner_dialpad" /> 61 </FrameLayout> 62 63 <RelativeLayout 64 android:layout_width="@dimen/manual_tuner_container_width" 65 android:layout_height="@dimen/manual_tuner_container_height" 66 android:orientation="vertical"> 67 68 <RelativeLayout 69 android:id="@+id/band_selector_container" 70 android:layout_alignParentTop="true" 71 android:layout_centerHorizontal="true" 72 android:layout_width="wrap_content" 73 android:layout_height="wrap_content" > 74 75 <com.android.car.radio.RadioBandButton 76 android:id="@+id/manual_tuner_am_band" 77 android:background="@drawable/radio_control_background" 78 android:layout_alignParentStart="true" 79 android:layout_marginEnd="@dimen/radio_default_spacing" 80 android:text="@string/radio_am_text" 81 style="@style/ManualTunerBandButton" /> 82 83 <com.android.car.radio.RadioBandButton 84 android:id="@+id/manual_tuner_fm_band" 85 android:background="@drawable/manual_tuner_band_bg" 86 android:layout_toEndOf="@id/manual_tuner_am_band" 87 android:text="@string/radio_fm_text" 88 style="@style/ManualTunerBandButton" /> 89 </RelativeLayout> 90 91 <!-- The layout_above/below combined with a layout_height of match_parent ensures that 92 this TextView fills the remaining space left by band_selector_container and 93 the manual_tuner_done_button. --> 94 <TextView 95 android:id="@+id/manual_tuner_channel" 96 android:layout_centerHorizontal="true" 97 android:layout_below="@id/band_selector_container" 98 android:layout_above="@+id/manual_tuner_done_button" 99 android:layout_width="wrap_content" 100 android:layout_height="match_parent" 101 android:gravity="center" 102 style="@style/ManualTunerChannelText" /> 103 104 <com.android.car.radio.RadioFabButton 105 android:id="@id/manual_tuner_done_button" 106 android:src="@drawable/ic_done" 107 android:layout_alignParentBottom="true" 108 android:layout_centerHorizontal="true" 109 style="@style/RadioFab" /> 110 111 <ImageView 112 android:id="@+id/manual_tuner_backspace" 113 android:background="@drawable/radio_control_background" 114 android:layout_alignBottom="@id/manual_tuner_done_button" 115 android:layout_toEndOf="@id/manual_tuner_done_button" 116 android:layout_width="@dimen/car_radio_fab_size" 117 android:layout_height="@dimen/car_radio_fab_size" 118 android:scaleType="center" 119 android:src="@drawable/ic_backspace" /> 120 </RelativeLayout> 121 </LinearLayout> 122 123 <!-- This dividing line is added as the last child so that it has the highest z-index. --> 124 <View 125 android:background="@color/car_list_divider" 126 android:layout_gravity="end|top" 127 android:layout_height="match_parent" 128 android:layout_width="1dp" 129 android:layout_marginEnd="@dimen/manual_tuner_container_width" /> 130 131 </FrameLayout> 132