blob: cb9e47c7736c99154a3c51806b3b929ea8ac703a [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- paddingStart is set for the case of full mode. (i.e. table is fully visible)
Set android:clipToPadding="false" in order not to clip current_time_indicator.
alpha and translationX are given to set them for initial values of enter animation. -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/program_guide_table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingTop="@dimen/program_guide_table_margin_top"
android:paddingBottom="@dimen/program_guide_table_margin_bottom"
android:paddingStart="@dimen/program_guide_table_margin_start"
android:paddingEnd="0dp"
android:translationX="@dimen/program_guide_table_exit_x"
android:alpha="0"
android:elevation="@dimen/program_guide_table_elevation"
android:outlineProvider="paddedBounds"
android:clipToPadding="false" >
<!-- Provides the background for time_row. This is needed in order to place the current time
indicator in between the background and the time label. -->
<View
android:layout_width="match_parent"
android:layout_height="@dimen/program_guide_table_header_row_height"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:background="@drawable/program_guide_table_header_row_background" />
<com.android.tv.ui.LocaleAwareTextClock
android:id="@+id/clock"
android:layout_width="@dimen/program_guide_table_header_column_width"
android:layout_height="@dimen/program_guide_table_header_row_height"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:paddingStart="@dimen/program_guide_table_header_column_padding_start"
android:paddingEnd="@dimen/program_guide_table_header_column_padding_end"
android:gravity="start|center_vertical"
android:textAlignment="viewStart"
android:fontFamily="@string/condensed_font"
android:textSize="@dimen/program_guide_table_header_row_font_size"
android:textColor="@color/program_guide_table_header_row_current_time_text_color" />
<ImageView
android:id="@+id/current_time_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toEndOf="@id/clock"
android:layout_marginTop="-4dp"
android:contentDescription="@null"
android:src="@drawable/program_guide_time_indicator" />
<com.android.tv.guide.TimelineRow
android:id="@+id/time_row"
android:layout_width="match_parent"
android:layout_height="@dimen/program_guide_table_header_row_height"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_toEndOf="@id/clock"
android:layout_marginStart="@dimen/program_guide_table_header_row_overlap"
android:fadingEdgeLength="@dimen/program_guide_table_header_row_fade_length"
android:requiresFadingEdge="horizontal"
android:background="#00000000" />
<com.android.tv.guide.ProgramGrid
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_below="@id/time_row" />
</RelativeLayout>