1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2020 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<LinearLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:id="@+id/media_output_dialog" 21 android:layout_width="@dimen/large_dialog_width" 22 android:layout_height="wrap_content" 23 android:background="@drawable/media_output_dialog_background" 24 android:orientation="vertical"> 25 26 <LinearLayout 27 android:id="@+id/media_metadata_section" 28 android:layout_width="match_parent" 29 android:layout_height="wrap_content" 30 android:gravity="start|center_vertical" 31 android:paddingStart="16dp" 32 android:paddingTop="16dp" 33 android:paddingEnd="16dp" 34 android:paddingBottom="16dp" 35 android:orientation="horizontal"> 36 <ImageView 37 android:id="@+id/header_icon" 38 android:layout_width="72dp" 39 android:layout_height="72dp" 40 android:importantForAccessibility="no"/> 41 42 <LinearLayout 43 android:layout_width="match_parent" 44 android:layout_height="wrap_content" 45 android:paddingStart="12dp" 46 android:orientation="vertical"> 47 <LinearLayout 48 android:layout_width="match_parent" 49 android:layout_height="wrap_content" 50 android:gravity="center_vertical" 51 android:orientation="horizontal"> 52 <ImageView 53 android:id="@+id/app_source_icon" 54 android:layout_width="20dp" 55 android:layout_height="20dp" 56 android:gravity="center_vertical" 57 android:importantForAccessibility="no"/> 58 59 <Space 60 android:layout_weight="1" 61 android:layout_width="0dp" 62 android:layout_height="match_parent"/> 63 64 <ImageView 65 android:id="@+id/broadcast_icon" 66 android:src="@drawable/settings_input_antenna" 67 android:contentDescription="@string/broadcasting_description_is_broadcasting" 68 android:layout_width="48dp" 69 android:layout_height="48dp" 70 android:padding="12dp" 71 android:gravity="center_vertical" 72 android:clickable="true" 73 android:focusable="true" 74 android:visibility="gone"/> 75 </LinearLayout> 76 <TextView 77 android:id="@+id/header_title" 78 android:layout_width="wrap_content" 79 android:layout_height="wrap_content" 80 android:ellipsize="end" 81 android:gravity="center_vertical" 82 android:maxLines="1" 83 android:textColor="?android:attr/textColorPrimary" 84 android:fontFamily="@*android:string/config_headlineFontFamilyMedium" 85 android:textSize="16sp"/> 86 <TextView 87 android:id="@+id/header_subtitle" 88 android:layout_width="wrap_content" 89 android:layout_height="wrap_content" 90 android:gravity="center_vertical" 91 android:ellipsize="end" 92 android:maxLines="1" 93 android:textColor="?android:attr/textColorSecondary" 94 android:fontFamily="@*android:string/config_bodyFontFamily" 95 android:textSize="14sp"/> 96 </LinearLayout> 97 </LinearLayout> 98 99 <ViewStub 100 android:id="@+id/broadcast_qrcode" 101 android:layout="@layout/media_output_broadcast_area" 102 android:layout_width="match_parent" 103 android:layout_height="wrap_content" > 104 </ViewStub> 105 106 <LinearLayout 107 android:id="@+id/device_list" 108 android:layout_width="match_parent" 109 android:layout_height="wrap_content" 110 android:layout_weight="1" 111 android:orientation="vertical"> 112 113 <androidx.recyclerview.widget.RecyclerView 114 android:id="@+id/list_result" 115 android:scrollbars="vertical" 116 android:paddingTop="8dp" 117 android:clipToPadding="false" 118 android:layout_width="match_parent" 119 android:layout_height="wrap_content"/> 120 </LinearLayout> 121 122 <LinearLayout 123 android:id="@+id/cast_app_section" 124 android:layout_width="match_parent" 125 android:layout_height="wrap_content" 126 android:layout_marginTop="20dp" 127 android:layout_marginStart="@dimen/dialog_side_padding" 128 android:layout_marginEnd="@dimen/dialog_side_padding" 129 android:layout_marginBottom="@dimen/dialog_bottom_padding" 130 android:orientation="vertical" 131 android:visibility="gone"> 132 <TextView 133 android:id="@+id/launch_app_title" 134 android:layout_width="wrap_content" 135 android:layout_height="wrap_content" 136 android:layout_gravity="center_vertical|start" 137 android:ellipsize="end" 138 android:textColor="?android:attr/textColorPrimary" 139 android:text="@string/media_output_dialog_launch_app_text" 140 android:maxLines="1" 141 android:fontFamily="@*android:string/config_headlineFontFamilyMedium" 142 android:textSize="16sp"/> 143 144 <Button 145 android:id="@+id/launch_app_button" 146 style="@style/Widget.Dialog.Button.BorderButton" 147 android:layout_width="wrap_content" 148 android:layout_height="wrap_content" 149 android:drawablePadding="5dp"/> 150 </LinearLayout> 151 152 <LinearLayout 153 android:layout_width="match_parent" 154 android:layout_height="wrap_content" 155 android:layout_marginTop="4dp" 156 android:layout_marginStart="@dimen/dialog_side_padding" 157 android:layout_marginEnd="@dimen/dialog_side_padding" 158 android:layout_marginBottom="@dimen/dialog_bottom_padding" 159 android:orientation="horizontal"> 160 161 <Button 162 android:id="@+id/stop" 163 style="@style/Widget.Dialog.Button.BorderButton" 164 android:layout_width="wrap_content" 165 android:layout_height="wrap_content" 166 android:text="@string/media_output_dialog_button_stop_casting" 167 android:visibility="gone"/> 168 169 <Space 170 android:layout_weight="1" 171 android:layout_width="0dp" 172 android:layout_height="match_parent"/> 173 174 <Button 175 android:id="@+id/done" 176 style="@style/Widget.Dialog.Button" 177 android:layout_width="wrap_content" 178 android:layout_height="wrap_content" 179 android:text="@string/inline_done_button"/> 180 </LinearLayout> 181</LinearLayout>