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 <!-- All info banners have the same id for use by TvTransitionManager. --> 18 <com.android.tv.ui.ChannelBannerView xmlns:android="http://schemas.android.com/apk/res/android" 19 android:id="@+id/scene_transition_common" 20 android:layout_width="wrap_content" 21 android:layout_height="wrap_content" 22 android:layout_marginTop="27dp" 23 android:layout_marginStart="132dp" 24 android:layout_marginEnd="132dp" 25 android:background="@drawable/info_banner_background" 26 android:elevation="8dp" > 27 28 <RelativeLayout android:id="@+id/channel_banner_view" 29 android:orientation="vertical" 30 android:layout_width="@dimen/channel_banner_width" 31 android:layout_height="wrap_content" 32 android:paddingTop="16dp" 33 android:paddingStart="16dp" 34 android:paddingEnd="32dp" 35 android:clipToPadding="false" 36 android:visibility="gone" > 37 38 <TextView android:id="@+id/channel_number" 39 android:layout_width="112dp" 40 android:layout_height="wrap_content" 41 android:layout_alignParentStart="true" 42 android:layout_alignParentTop="true" 43 android:layout_marginTop="@dimen/channel_banner_channel_number_large_margin_top" 44 android:textColor="@color/channel_banner_text_color" 45 android:fontFamily="@string/thin_font" 46 android:textSize="@dimen/channel_banner_channel_number_large_text_size" /> 47 48 <ImageView android:id="@+id/channel_logo" 49 android:layout_width="@dimen/channel_banner_channel_logo_width" 50 android:layout_height="@dimen/channel_banner_channel_logo_height" 51 android:layout_marginStart="@dimen/channel_banner_channel_logo_margin_start" 52 android:layout_alignParentTop="true" 53 android:layout_alignParentEnd="true" /> 54 55 <TextView android:id="@+id/program_text" 56 android:layout_width="match_parent" 57 android:layout_height="wrap_content" 58 android:layout_marginTop="@dimen/channel_banner_program_large_margin_top" 59 android:layout_alignParentTop="true" 60 android:layout_toEndOf="@id/channel_number" 61 android:layout_toStartOf="@id/channel_logo" 62 android:maxLines="2" 63 android:lineSpacingExtra="0.5sp" 64 android:ellipsize="end" 65 android:textColor="@color/channel_banner_text_color" 66 android:fontFamily="@string/light_font" 67 android:textSize="@dimen/channel_banner_program_large_text_size" /> 68 69 <Space android:id="@+id/anchor" 70 android:layout_width="0dp" 71 android:layout_height="0dp" 72 android:layout_marginTop="@dimen/channel_banner_anchor_one_line_y" 73 android:layout_marginBottom="16dp" 74 android:layout_alignParentTop="true" 75 android:layout_toEndOf="@id/channel_number" /> 76 77 <ImageView android:id="@+id/tvinput_logo" 78 android:layout_width="@dimen/channel_banner_input_logo_size" 79 android:layout_height="@dimen/channel_banner_input_logo_size" 80 android:layout_marginEnd="8dp" 81 android:layout_marginBottom="-2dp" 82 android:layout_alignBottom="@id/anchor" 83 android:layout_toEndOf="@id/anchor" 84 android:visibility="gone" /> 85 86 <TextView android:id="@+id/channel_name" 87 android:layout_width="wrap_content" 88 android:layout_height="wrap_content" 89 android:layout_marginEnd="12dp" 90 android:layout_marginBottom="-4sp" 91 android:layout_alignBottom="@id/anchor" 92 android:layout_toEndOf="@id/tvinput_logo" 93 android:singleLine="true" 94 android:ellipsize="end" 95 android:maxWidth="@dimen/channel_name_max_width" 96 android:textColor="@color/channel_banner_text_color" 97 android:fontFamily="@string/condensed_font" 98 android:textSize="@dimen/channel_banner_small_text_size" /> 99 100 <TextView android:id="@+id/program_time_text" 101 android:layout_width="wrap_content" 102 android:layout_height="wrap_content" 103 android:layout_marginEnd="12dp" 104 android:layout_alignBottom="@id/channel_name" 105 android:layout_toEndOf="@id/channel_name" 106 android:textColor="@color/channel_banner_dim_text_color" 107 android:fontFamily="@string/condensed_font" 108 android:textSize="@dimen/channel_banner_small_text_size" /> 109 110 <ProgressBar 111 android:id="@+id/remaining_time" 112 style="?android:attr/progressBarStyleHorizontal" 113 android:layout_width="60dp" 114 android:layout_height="4dp" 115 android:layout_alignBottom="@id/anchor" 116 android:layout_toEndOf="@id/program_time_text" 117 android:layout_marginEnd="12dp" 118 android:layout_marginBottom="0.5dp" 119 android:mirrorForRtl="false" 120 android:progressDrawable="@drawable/progress_horizontal" 121 android:indeterminate="false" 122 android:max="100" /> 123 124 <include layout="@layout/program_track_meta" 125 android:layout_width="wrap_content" 126 android:layout_height="wrap_content" 127 android:layout_alignBottom="@id/anchor" 128 android:layout_toEndOf="@id/remaining_time" /> 129 130 <TextView android:id="@+id/program_description" 131 android:layout_width="@dimen/channel_banner_program_description_width" 132 android:layout_height="wrap_content" 133 android:layout_toEndOf="@id/channel_number" 134 android:layout_below="@id/anchor" 135 android:layout_marginTop="-9dp" 136 android:layout_marginBottom="12.5dp" 137 android:maxLines="3" 138 android:lineSpacingExtra="3sp" 139 android:ellipsize="end" 140 android:textColor="@color/channel_banner_dim_text_color" 141 android:textSize="12sp" /> 142 143 </RelativeLayout> 144 145 </com.android.tv.ui.ChannelBannerView> 146