Home | History | Annotate | Download | only in layout
      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         <LinearLayout
     80             android:layout_width="match_parent"
     81             android:layout_height="wrap_content"
     82             android:layout_weight="0">
     83 
     84             <SeekBar android:id="@+id/seekbar"
     85                  android:layout_width="fill_parent"
     86                  android:layout_height="wrap_content"
     87                  style="?android:attr/progressBarStyleHorizontal"
     88                  android:max="100"
     89                  android:progress="0"
     90                  android:layout_gravity="center"
     91                  android:layout_weight="1"/>
     92 
     93             <ImageButton android:id="@+id/pause_resume_button"
     94                 android:layout_width="wrap_content"
     95                 android:layout_height="wrap_content"
     96                 android:layout_weight="0"
     97                 android:layout_gravity="right"
     98                 android:minWidth="48dp"
     99                 android:minHeight="48dp"
    100                 android:background="@null"
    101                 android:src="@drawable/ic_media_pause" />
    102 
    103             <ImageButton android:id="@+id/stop_button"
    104                 android:layout_width="wrap_content"
    105                 android:layout_height="wrap_content"
    106                 android:layout_weight="0"
    107                 android:layout_gravity="right"
    108                 android:minWidth="48dp"
    109                 android:minHeight="48dp"
    110                 android:background="@null"
    111                 android:src="@drawable/ic_media_stop" />
    112         </LinearLayout>
    113 
    114     </LinearLayout>
    115 
    116     <!-- Some content for visual interest in the case where no presentation is showing. -->
    117     <FrameLayout android:id="@+id/player"
    118         android:background="#ff000000"
    119         android:layout_width="match_parent"
    120         android:layout_height="0dp"
    121         android:layout_weight="1">
    122         <LinearLayout
    123             android:layout_width="match_parent"
    124             android:layout_height="match_parent"
    125             android:gravity="center">
    126             <SurfaceView android:id="@+id/surface_view"
    127                 android:layout_width="match_parent"
    128                 android:layout_height="match_parent"/>
    129         </LinearLayout>
    130         <TextView
    131             android:textColor="#ffaaaaaa"
    132             android:text="@string/sample_media_route_activity_local"
    133             android:layout_width="wrap_content"
    134             android:layout_height="wrap_content"
    135             android:layout_gravity="top|center_horizontal" />
    136     </FrameLayout>
    137 </LinearLayout>
    138