Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2017 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 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     18     android:layout_width="match_parent"
     19     android:layout_height="match_parent"
     20     android:orientation="vertical"
     21     android:layoutDirection="ltr">
     22 
     23     <RelativeLayout
     24         android:id="@+id/title_bar"
     25         android:background="@layout/title_bar_gradient"
     26         style="@style/TitleBar">
     27 
     28         <LinearLayout
     29             android:id="@+id/title_bar_left"
     30             android:gravity="center"
     31             android:layout_width="wrap_content"
     32             android:layout_height="wrap_content"
     33             android:layout_alignParentLeft="true"
     34             android:layout_centerVertical="true"
     35             android:orientation="horizontal">
     36 
     37             <ImageButton
     38                 android:id="@+id/back"
     39                 android:clickable="true"
     40                 android:layout_width="wrap_content"
     41                 android:layout_height="wrap_content"
     42                 android:layout_alignParentStart="true"
     43                 android:layout_centerVertical="true"
     44                 android:paddingLeft="5dip"
     45                 android:visibility="visible"
     46                 style="@style/TitleBarButton.Back"/>
     47 
     48             <TextView
     49                 android:id="@+id/title_text"
     50                 android:ellipsize="end"
     51                 android:layout_width="wrap_content"
     52                 android:layout_height="wrap_content"
     53                 android:layout_toRightOf="@id/back"
     54                 android:layout_centerVertical="true"
     55                 android:maxLines="1"
     56                 android:paddingLeft="5dip"
     57                 android:paddingRight="5dip"
     58                 android:textSize="15sp"
     59                 android:textColor="#FFFFFFFF"/>
     60         </LinearLayout>
     61 
     62         <LinearLayout
     63             android:id="@+id/title_bar_right"
     64             android:gravity="center"
     65             android:layout_width="wrap_content"
     66             android:layout_height="wrap_content"
     67             android:layout_alignParentRight="true"
     68             android:layout_centerVertical="true"
     69             android:orientation="horizontal">
     70 
     71             <LinearLayout
     72                 android:id="@+id/ad_external_link"
     73                 android:clickable="true"
     74                 android:gravity="center"
     75                 android:layout_width="wrap_content"
     76                 android:layout_height="wrap_content"
     77                 android:layout_alignParentRight="true"
     78                 android:layout_centerVertical="true"
     79                 android:paddingLeft="5dip"
     80                 android:paddingRight="10dip"
     81                 android:orientation="horizontal"
     82                 android:visibility="gone">
     83 
     84                 <TextView
     85                     android:id="@+id/ad_text"
     86                     android:layout_width="wrap_content"
     87                     android:layout_height="wrap_content"
     88                     android:layout_centerVertical="true"
     89                     android:paddingRight="5dip"
     90                     android:text="@string/MediaControlView2_ad_text"
     91                     android:textSize="10sp"
     92                     android:textColor="#FFFFFFFF" />
     93 
     94                 <ImageButton
     95                     android:id="@+id/ad_launch"
     96                     android:layout_width="wrap_content"
     97                     android:layout_height="wrap_content"
     98                     android:layout_centerVertical="true"
     99                     style="@style/TitleBarButton.Launch" />
    100             </LinearLayout>
    101 
    102             <view class="com.android.support.mediarouter.app.MediaRouteButton"
    103                 android:id="@+id/cast"
    104                 android:layout_centerVertical="true"
    105                 android:visibility="gone"
    106                 android:contentDescription="@string/mr_button_content_description"
    107                 style="@style/TitleBarButton" />
    108         </LinearLayout>
    109 
    110     </RelativeLayout>
    111 
    112     <LinearLayout
    113         android:id="@+id/center_view"
    114         android:layout_width="match_parent"
    115         android:layout_height="0dp"
    116         android:layout_weight="1"
    117         android:gravity="center"
    118         android:orientation="vertical">
    119     </LinearLayout>
    120 
    121     <LinearLayout
    122         android:id="@+id/minimal_extra_view"
    123         android:layout_width="match_parent"
    124         android:layout_height="wrap_content"
    125         android:gravity="right">
    126 
    127         <ImageButton
    128             android:id="@+id/fullscreen"
    129             android:gravity="right"
    130             style="@style/BottomBarButton.FullScreen" />
    131     </LinearLayout>
    132 
    133     <RelativeLayout
    134         android:layout_width="match_parent"
    135         android:layout_height="@dimen/mcv2_custom_progress_thumb_size">
    136 
    137         <SeekBar
    138             android:id="@+id/progress"
    139             android:layout_width="match_parent"
    140             android:layout_height="@dimen/mcv2_custom_progress_thumb_size"
    141             android:contentDescription="@string/mcv2_seek_bar_desc"
    142             android:padding="0dp"
    143             android:maxHeight="@dimen/mcv2_custom_progress_max_size"
    144             android:minHeight="@dimen/mcv2_custom_progress_max_size"
    145             android:elevation="10dp"/>
    146 
    147         <View
    148             android:id="@+id/progress_buffer"
    149             android:layout_width="match_parent"
    150             android:layout_height="@dimen/mcv2_buffer_view_height"
    151             android:layout_alignParentBottom="true"
    152             android:background="@color/bottom_bar_background"
    153             android:elevation="0dp"/>
    154     </RelativeLayout>
    155 
    156     <RelativeLayout
    157         android:id="@+id/bottom_bar"
    158         android:layout_width="match_parent"
    159         android:layout_height="44dp"
    160         android:orientation="horizontal"
    161         android:background="@color/bottom_bar_background">
    162 
    163         <LinearLayout
    164             android:id="@+id/bottom_bar_left"
    165             android:layout_width="wrap_content"
    166             android:layout_height="match_parent"
    167             android:layout_alignParentStart="true"
    168             android:layout_centerVertical="true">
    169 
    170             <TextView
    171                 android:id="@+id/ad_skip_time"
    172                 android:gravity="center"
    173                 android:layout_width="wrap_content"
    174                 android:layout_height="match_parent"
    175                 android:layout_marginLeft="4dp"
    176                 android:textSize="12sp"
    177                 android:textColor="#FFFFFF"
    178                 android:visibility="gone" />
    179         </LinearLayout>
    180 
    181         <LinearLayout
    182             android:id="@+id/time"
    183             android:layout_width="wrap_content"
    184             android:layout_height="match_parent"
    185             android:layout_toRightOf="@id/bottom_bar_left"
    186             android:paddingLeft="10dp"
    187             android:paddingRight="10dp"
    188             android:gravity="center" >
    189 
    190             <TextView
    191                 android:id="@+id/time_current"
    192                 style="@style/TimeText.Current"/>
    193             <TextView
    194                 android:id="@+id/time_interpunct"
    195                 style="@style/TimeText.Interpunct"/>
    196             <TextView
    197                 android:id="@+id/time_end"
    198                 style="@style/TimeText.End"/>
    199         </LinearLayout>
    200 
    201         <LinearLayout
    202             android:id="@+id/bottom_bar_right"
    203             android:layout_width="wrap_content"
    204             android:layout_height="wrap_content"
    205             android:layout_alignParentEnd="true"
    206             android:gravity="right">
    207 
    208             <LinearLayout
    209                 android:id="@+id/basic_controls"
    210                 android:layout_width="wrap_content"
    211                 android:layout_height="wrap_content"
    212                 android:gravity="center_vertical"
    213                 android:orientation="horizontal" >
    214 
    215                 <TextView
    216                     android:id="@+id/ad_remaining"
    217                     android:layout_width="wrap_content"
    218                     android:layout_height="wrap_content"
    219                     android:gravity="center"
    220                     android:textSize="12sp"
    221                     android:textColor="#FFFFFF"
    222                     android:visibility="gone" />
    223 
    224                 <ImageButton
    225                     android:id="@+id/mute"
    226                     style="@style/BottomBarButton.Mute" />
    227                 <ImageButton
    228                     android:id="@+id/subtitle"
    229                     android:scaleType="fitCenter"
    230                     android:visibility="gone"
    231                     style="@style/BottomBarButton.CC" />
    232                 <ImageButton
    233                     android:id="@+id/fullscreen"
    234                     style="@style/BottomBarButton.FullScreen"/>
    235                 <ImageButton
    236                     android:id="@+id/overflow_right"
    237                     style="@style/BottomBarButton.OverflowRight"/>
    238             </LinearLayout>
    239 
    240             <LinearLayout
    241                 android:id="@+id/extra_controls"
    242                 android:layout_width="wrap_content"
    243                 android:layout_height="wrap_content"
    244                 android:visibility="gone"
    245                 android:orientation="horizontal"
    246                 android:gravity="center_vertical">
    247 
    248                 <LinearLayout
    249                     android:id="@+id/custom_buttons"
    250                     android:layout_width="wrap_content"
    251                     android:layout_height="wrap_content" />
    252 
    253                 <ImageButton
    254                     android:id="@+id/video_quality"
    255                     style="@style/BottomBarButton.VideoQuality" />
    256                 <ImageButton
    257                     android:id="@+id/settings"
    258                     style="@style/BottomBarButton.Settings" />
    259                 <ImageButton
    260                     android:id="@+id/overflow_left"
    261                     style="@style/BottomBarButton.OverflowLeft"/>
    262             </LinearLayout>
    263         </LinearLayout>
    264     </RelativeLayout>
    265 </LinearLayout>
    266