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 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:id="@+id/radio_background" 20 android:background="@color/car_radio_bg_color" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent" > 23 24 <FrameLayout 25 android:background="@color/car_radio_display_scrim" 26 android:layout_width="match_parent" 27 android:layout_height="match_parent" /> 28 29 <LinearLayout 30 android:id="@+id/radio_error_display" 31 android:gravity="center" 32 android:layout_width="match_parent" 33 android:layout_height="match_parent" 34 android:paddingBottom="@dimen/car_action_bar_height" 35 android:visibility="gone" 36 android:orientation="vertical" > 37 38 <ImageView 39 android:layout_gravity="center_horizontal" 40 android:layout_width="@dimen/radio_error_icon_size" 41 android:layout_height="@dimen/radio_error_icon_size" 42 android:layout_marginBottom="@dimen/radio_error_icon_bottom_margin" 43 android:src="@drawable/ic_error" /> 44 45 <TextView 46 android:layout_gravity="center_horizontal" 47 android:layout_width="wrap_content" 48 android:layout_height="wrap_content" 49 android:textSize="@dimen/radio_error_text_size" 50 android:textColor="@color/car_grey_50" 51 android:text="@string/radio_problem_text" /> 52 53 </LinearLayout> 54 55 <LinearLayout 56 android:id="@+id/main_radio_display" 57 android:layout_width="match_parent" 58 android:layout_height="match_parent" 59 android:orientation="vertical" > 60 61 <LinearLayout 62 android:id="@+id/radio_station_display_container" 63 android:layout_width="match_parent" 64 android:layout_height="0dp" 65 android:layout_weight="1" 66 android:gravity="center" 67 android:orientation="vertical"> 68 69 <TextView 70 android:id="@+id/radio_station_name" 71 android:ellipsize="end" 72 android:layout_gravity="center" 73 android:layout_width="wrap_content" 74 android:layout_height="wrap_content" 75 android:maxLines="@integer/radio_metadata2_max_lines" 76 android:textColor="@color/car_headline1_light" 77 android:textSize="@dimen/car_headline1_size" 78 android:visibility="invisible" /> 79 <ViewStub 80 android:id="@+id/single_channel_view_stub" 81 android:layout="@layout/radio_single_channel" 82 android:layout_gravity="center" 83 android:layout_width="wrap_content" 84 android:layout_height="wrap_content" /> 85 <TextView 86 android:id="@+id/radio_station_song_artist" 87 android:ellipsize="end" 88 android:layout_gravity="center" 89 android:layout_width="wrap_content" 90 android:layout_height="wrap_content" 91 android:maxLines="@integer/radio_metadata1_max_lines" 92 android:textColor="@color/car_headline1_light" 93 android:textSize="@dimen/car_headline1_size" 94 android:fontFamily="sans-serif-medium" 95 android:visibility="invisible" /> 96 </LinearLayout> 97 98 <android.support.v7.widget.CardView 99 android:id="@+id/radio_layout_container" 100 android:layout_gravity="center_horizontal" 101 android:transitionName="@string/radio_controls_transition_name" 102 android:layout_width="match_parent" 103 android:layout_height="@dimen/car_action_bar_height" 104 app:cardBackgroundColor="@color/car_card" > 105 106 <include layout="@layout/radio_controls" /> 107 </android.support.v7.widget.CardView> 108 </LinearLayout> 109 </FrameLayout> 110