Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   ~ Copyright (C) 2015 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 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     19     android:id="@+id/detail"
     20     android:layout_width="match_parent"
     21     android:layout_height="@dimen/program_guide_table_detail_height"
     22     android:background="@color/program_guide_table_grid_background" >
     23 
     24     <!-- The following element is needed to not get a gap in the background during transition. -->
     25     <FrameLayout
     26         android:id="@+id/detail_content_full"
     27         android:layout_width="match_parent"
     28         android:layout_height="match_parent"
     29         android:layout_marginTop="@dimen/program_guide_table_detail_padding_negative"
     30         android:layout_marginStart="@dimen/program_guide_table_detail_padding_negative"
     31         android:layout_marginBottom="@dimen/program_guide_table_detail_padding_negative"
     32         android:layout_marginEnd="@dimen/program_guide_table_detail_padding_negative"
     33         android:padding="@dimen/program_guide_table_detail_padding"
     34         android:background="@color/program_guide_table_detail_background" >
     35 
     36         <!-- The following element is needed to fade content separate from the background. -->
     37         <RelativeLayout
     38             android:id="@+id/detail_content"
     39             android:layout_width="match_parent"
     40             android:layout_height="match_parent"
     41             android:paddingStart="@dimen/program_guide_table_detail_padding"
     42             android:paddingTop="@dimen/program_guide_table_detail_padding"
     43             android:paddingBottom="@dimen/program_guide_table_detail_padding"
     44             android:paddingEnd="@dimen/program_guide_table_detail_padding_end" >
     45 
     46             <ImageView
     47                 android:id="@+id/image"
     48                 android:layout_width="wrap_content"
     49                 android:layout_height="wrap_content"
     50                 android:adjustViewBounds="true"
     51                 android:maxWidth="@dimen/program_guide_table_detail_image_width"
     52                 android:maxHeight="@dimen/program_guide_table_detail_image_height"
     53                 android:layout_alignParentStart="true"
     54                 android:layout_centerVertical="true"
     55                 android:layout_marginEnd="@dimen/program_guide_table_detail_image_margin_end" />
     56 
     57             <TextView
     58                 android:id="@+id/title"
     59                 android:layout_width="wrap_content"
     60                 android:layout_height="wrap_content"
     61                 android:layout_alignWithParentIfMissing="true"
     62                 android:layout_alignParentTop="true"
     63                 android:layout_toEndOf="@id/image"
     64                 android:layout_marginTop="@dimen/program_guide_table_detail_title_margin_top"
     65                 android:fontFamily="@string/condensed_font"
     66                 android:textSize="@dimen/program_guide_table_detail_title_text_size"
     67                 android:textColor="@color/program_guide_table_detail_title_text_color"
     68                 android:singleLine="true"
     69                 android:ellipsize="end" />
     70 
     71             <TextView
     72                 android:id="@+id/time"
     73                 android:layout_width="wrap_content"
     74                 android:layout_height="wrap_content"
     75                 android:layout_alignParentTop="true"
     76                 android:layout_alignStart="@id/title"
     77                 android:layout_marginTop="@dimen/program_guide_table_detail_time_margin_top"
     78                 android:fontFamily="@string/condensed_font"
     79                 android:textSize="@dimen/program_guide_table_detail_time_text_size"
     80                 android:textColor="@color/program_guide_table_detail_time_text_color" />
     81 
     82             <include layout="@layout/program_track_meta"
     83                 android:id="@+id/program_track_meta"
     84                 android:layout_width="wrap_content"
     85                 android:layout_height="wrap_content"
     86                 android:layout_alignBottom="@id/time"
     87                 android:layout_toEndOf="@id/time"
     88                 android:layout_marginStart="@dimen/program_guide_table_detail_meta_margin_start"
     89                 android:layout_marginBottom="@dimen/program_guide_table_detail_meta_margin_bottom" />
     90 
     91             <LinearLayout android:id="@+id/dvr_indicator"
     92                 android:orientation="horizontal"
     93                 android:layout_alignBottom="@id/time"
     94                 android:layout_toEndOf="@id/program_track_meta"
     95                 android:layout_width="wrap_content"
     96                 android:layout_height="wrap_content"
     97                 android:layout_centerVertical="true"
     98                 android:visibility="gone" >
     99 
    100                 <ImageView android:id="@+id/dvr_icon"
    101                     android:layout_width="wrap_content"
    102                     android:layout_height="wrap_content"
    103                     android:layout_marginEnd="@dimen/program_guide_table_detail_dvr_drawable_padding"
    104                     android:layout_marginTop="@dimen/program_guide_table_detail_dvr_icon_margin_top"
    105                     android:layout_gravity="center" />
    106 
    107                 <TextView android:id="@+id/dvr_text_icon"
    108                     style="@style/track_meta_text"
    109                     android:text="@string/dvr_epg_program_icon_text"
    110                     android:layout_marginEnd="@dimen/program_guide_table_detail_dvr_drawable_padding"
    111                     android:layout_marginTop="@dimen/program_guide_table_detail_dvr_icon_margin_top"
    112                     android:layout_gravity="center"
    113                     android:visibility="gone" />
    114 
    115                 <TextView android:id="@+id/dvr_status"
    116                     android:layout_width="wrap_content"
    117                     android:layout_height="wrap_content"
    118                     android:layout_gravity="center"
    119                     android:textSize="@dimen/program_guide_table_detail_dvr_text_size"
    120                     android:textColor="@color/program_guide_table_detail_dvr_text_color" />
    121             </LinearLayout>
    122 
    123             <!-- layout for the rotten tomatoes score -->
    124             <LinearLayout
    125                 android:id="@+id/critic_scores"
    126                 android:orientation="horizontal"
    127                 android:layout_width="wrap_content"
    128                 android:layout_height="wrap_content"
    129                 android:layout_alignBottom="@id/time"
    130                 android:layout_toEndOf="@id/dvr_indicator"
    131                 android:layout_marginStart="@dimen/program_guide_table_detail_critic_scores_margin_start" >
    132             </LinearLayout>
    133 
    134             <LinearLayout
    135                 android:orientation="horizontal"
    136                 android:layout_width="match_parent"
    137                 android:layout_height="match_parent"
    138                 android:layout_marginTop="@dimen/program_guide_table_detail_desc_margin_top"
    139                 android:layout_alignParentTop="true"
    140                 android:layout_alignStart="@id/title" >
    141 
    142                 <ImageView
    143                     android:id="@+id/block"
    144                     android:layout_width="@dimen/program_guide_table_detail_block_width"
    145                     android:layout_height="@dimen/program_guide_table_detail_block_height"
    146                     android:layout_marginEnd="@dimen/program_guide_table_detail_block_margin_end"
    147                     android:src="@drawable/ic_guide_lock"
    148                     android:alpha="@dimen/program_guide_table_detail_block_opacity" />
    149 
    150                 <TextView
    151                     android:id="@+id/desc"
    152                     android:layout_width="match_parent"
    153                     android:layout_height="wrap_content"
    154                     android:fontFamily="@string/font"
    155                     android:textSize="@dimen/program_guide_table_detail_desc_text_size"
    156                     android:textColor="@color/program_guide_table_detail_desc_text_color"
    157                     android:lineSpacingExtra="4sp"
    158                     android:maxLines="2"
    159                     android:ellipsize="end" />
    160 
    161             </LinearLayout>
    162 
    163         </RelativeLayout>
    164 
    165     </FrameLayout>
    166 
    167 </FrameLayout>
    168