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 <!-- paddingStart is set for the case of full mode. (i.e. table is fully visible)
     19      Set android:clipToPadding="false" in order not to clip current_time_indicator.
     20      alpha and translationX are given to set them for initial values of enter animation. -->
     21 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     22     android:id="@+id/program_guide_table"
     23     android:layout_width="match_parent"
     24     android:layout_height="wrap_content"
     25     android:layout_gravity="center_vertical"
     26     android:paddingTop="@dimen/program_guide_table_margin_top"
     27     android:paddingBottom="@dimen/program_guide_table_margin_bottom"
     28     android:paddingStart="@dimen/program_guide_table_margin_start"
     29     android:paddingEnd="0dp"
     30     android:translationX="@dimen/program_guide_table_exit_x"
     31     android:alpha="0"
     32     android:elevation="@dimen/program_guide_table_elevation"
     33     android:outlineProvider="paddedBounds"
     34     android:clipToPadding="false" >
     35 
     36     <!-- Provides the background for time_row. This is needed in order to place the current time
     37          indicator in between the background and the time label. -->
     38     <View
     39         android:layout_width="match_parent"
     40         android:layout_height="@dimen/program_guide_table_header_row_height"
     41         android:layout_alignParentTop="true"
     42         android:layout_alignParentStart="true"
     43         android:layout_alignParentEnd="true"
     44         android:background="@drawable/program_guide_table_header_row_background" />
     45 
     46     <com.android.tv.ui.LocaleAwareTextClock
     47         android:id="@+id/clock"
     48         android:layout_width="@dimen/program_guide_table_header_column_width"
     49         android:layout_height="@dimen/program_guide_table_header_row_height"
     50         android:layout_alignParentTop="true"
     51         android:layout_alignParentStart="true"
     52         android:paddingStart="@dimen/program_guide_table_header_column_padding_start"
     53         android:paddingEnd="@dimen/program_guide_table_header_column_padding_end"
     54         android:gravity="start|center_vertical"
     55         android:textAlignment="viewStart"
     56         android:fontFamily="@string/condensed_font"
     57         android:textSize="@dimen/program_guide_table_header_row_font_size"
     58         android:textColor="@color/program_guide_table_header_row_current_time_text_color" />
     59 
     60     <ImageView
     61         android:id="@+id/current_time_indicator"
     62         android:layout_width="wrap_content"
     63         android:layout_height="wrap_content"
     64         android:layout_alignParentTop="true"
     65         android:layout_toEndOf="@id/clock"
     66         android:layout_marginTop="-4dp"
     67         android:contentDescription="@null"
     68         android:src="@drawable/program_guide_time_indicator" />
     69 
     70     <com.android.tv.guide.TimelineRow
     71         android:id="@+id/time_row"
     72         android:layout_width="match_parent"
     73         android:layout_height="@dimen/program_guide_table_header_row_height"
     74         android:layout_alignParentTop="true"
     75         android:layout_alignParentEnd="true"
     76         android:layout_toEndOf="@id/clock"
     77         android:layout_marginStart="@dimen/program_guide_table_header_row_overlap"
     78         android:fadingEdgeLength="@dimen/program_guide_table_header_row_fade_length"
     79         android:requiresFadingEdge="horizontal"
     80         android:background="#00000000" />
     81 
     82     <com.android.tv.guide.ProgramGrid
     83         android:id="@+id/grid"
     84         android:layout_width="match_parent"
     85         android:layout_height="wrap_content"
     86         android:layout_alignParentBottom="true"
     87         android:layout_alignParentEnd="true"
     88         android:layout_below="@id/time_row" />
     89 
     90 </RelativeLayout>
     91