1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2013 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 17<!-- See corresponding Java code SampleMediaRouterActivity.java. --> 18 19<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent" 22 android:orientation="vertical"> 23 <LinearLayout 24 android:layout_width="match_parent" 25 android:layout_height="0dp" 26 android:layout_weight="1" 27 android:orientation="vertical"> 28 <!-- Tabs for media library, playlist and statistics --> 29 <TabHost android:id="@+id/tabHost" 30 android:layout_width="fill_parent" 31 android:layout_height="fill_parent" 32 android:layout_weight="1"> 33 <LinearLayout 34 android:orientation="vertical" 35 android:layout_width="fill_parent" 36 android:layout_height="fill_parent"> 37 <TabWidget android:id="@android:id/tabs" 38 android:layout_width="fill_parent" 39 android:layout_height="wrap_content" /> 40 41 <FrameLayout android:id="@android:id/tabcontent" 42 android:layout_width="fill_parent" 43 android:layout_height="wrap_content"> 44 <LinearLayout android:id="@+id/tab1" 45 android:layout_width="fill_parent" 46 android:layout_height="wrap_content" 47 android:orientation="vertical"> 48 <ListView android:id="@+id/media" 49 android:layout_width="match_parent" 50 android:layout_height="wrap_content" 51 android:layout_weight="1" /> 52 </LinearLayout> 53 54 <LinearLayout android:id="@+id/tab2" 55 android:layout_width="fill_parent" 56 android:layout_height="fill_parent" 57 android:orientation="vertical"> 58 <ListView android:id="@+id/playlist" 59 android:layout_width="match_parent" 60 android:layout_height="wrap_content" 61 android:layout_weight="1"/> 62 </LinearLayout> 63 64 <LinearLayout android:id="@+id/tab3" 65 android:layout_width="fill_parent" 66 android:layout_height="fill_parent" 67 android:orientation="vertical"> 68 <TextView android:id="@+id/info" 69 android:layout_width="match_parent" 70 android:layout_height="wrap_content" 71 android:layout_weight="1" 72 android:textAppearance="?android:attr/textAppearanceMedium"/> 73 </LinearLayout> 74 </FrameLayout> 75 </LinearLayout> 76 </TabHost> 77 78 <!-- Control buttons for the currently selected route. --> 79 <CheckBox android:id="@+id/custom_control_view_checkbox" 80 android:layout_width="match_parent" 81 android:layout_height="wrap_content" 82 android:text="@string/use_default_media_control" 83 android:checked="true" 84 android:visibility="gone"/> 85 <LinearLayout 86 android:layout_width="match_parent" 87 android:layout_height="wrap_content" 88 android:layout_weight="0"> 89 90 <SeekBar android:id="@+id/seekbar" 91 android:layout_width="fill_parent" 92 android:layout_height="wrap_content" 93 style="?android:attr/progressBarStyleHorizontal" 94 android:max="100" 95 android:progress="0" 96 android:layout_gravity="center" 97 android:layout_weight="1"/> 98 99 <ImageButton android:id="@+id/pause_resume_button" 100 android:layout_width="wrap_content" 101 android:layout_height="wrap_content" 102 android:layout_weight="0" 103 android:layout_gravity="right" 104 android:minWidth="48dp" 105 android:minHeight="48dp" 106 android:background="@null" 107 android:src="@drawable/ic_media_pause" /> 108 109 <ImageButton android:id="@+id/stop_button" 110 android:layout_width="wrap_content" 111 android:layout_height="wrap_content" 112 android:layout_weight="0" 113 android:layout_gravity="right" 114 android:minWidth="48dp" 115 android:minHeight="48dp" 116 android:background="@null" 117 android:src="@drawable/ic_media_stop" /> 118 </LinearLayout> 119 120 </LinearLayout> 121 122 <!-- Some content for visual interest in the case where no presentation is showing. --> 123 <FrameLayout android:id="@+id/player" 124 android:background="#ff000000" 125 android:layout_width="match_parent" 126 android:layout_height="0dp" 127 android:layout_weight="1"> 128 <LinearLayout 129 android:layout_width="match_parent" 130 android:layout_height="match_parent" 131 android:gravity="center"> 132 <SurfaceView android:id="@+id/surface_view" 133 android:layout_width="match_parent" 134 android:layout_height="match_parent"/> 135 </LinearLayout> 136 <TextView 137 android:textColor="#ffaaaaaa" 138 android:text="@string/sample_media_route_activity_local" 139 android:layout_width="wrap_content" 140 android:layout_height="wrap_content" 141 android:layout_gravity="top|center_horizontal" /> 142 </FrameLayout> 143</LinearLayout> 144