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 <ImageView android:id="@+id/channel_signal_strength" 87 android:layout_width="@dimen/channel_banner_input_logo_size" 88 android:layout_height="@dimen/channel_banner_input_logo_size" 89 android:layout_marginEnd="8dp" 90 android:layout_marginBottom="-2dp" 91 android:layout_alignBottom="@id/anchor" 92 android:layout_toEndOf="@id/tvinput_logo" 93 android:visibility="gone" /> 94 95 <TextView android:id="@+id/channel_name" 96 android:layout_width="wrap_content" 97 android:layout_height="wrap_content" 98 android:layout_marginEnd="12dp" 99 android:layout_marginBottom="-4sp" 100 android:layout_alignBottom="@id/anchor" 101 android:layout_toEndOf="@id/channel_signal_strength" 102 android:singleLine="true" 103 android:ellipsize="end" 104 android:maxWidth="@dimen/channel_name_max_width" 105 android:textColor="@color/channel_banner_text_color" 106 android:fontFamily="@string/condensed_font" 107 android:textSize="@dimen/channel_banner_small_text_size" /> 108 109 <TextView android:id="@+id/program_time_text" 110 android:layout_width="wrap_content" 111 android:layout_height="wrap_content" 112 android:layout_marginEnd="12dp" 113 android:layout_alignBottom="@id/channel_name" 114 android:layout_toEndOf="@id/channel_name" 115 android:textColor="@color/channel_banner_dim_text_color" 116 android:fontFamily="@string/condensed_font" 117 android:textSize="@dimen/channel_banner_small_text_size" /> 118 119 <TextView android:id="@+id/recording_indicator" 120 android:layout_width="wrap_content" 121 android:layout_height="wrap_content" 122 android:layout_marginEnd="12dp" 123 android:layout_alignBottom="@id/channel_name" 124 android:layout_toEndOf="@id/program_time_text" 125 android:drawableStart="@drawable/ic_recording_program" 126 android:textColor="@color/channel_banner_dim_text_color" 127 android:fontFamily="@string/condensed_font" 128 android:textSize="@dimen/channel_banner_small_text_size" /> 129 130 <ProgressBar 131 android:id="@+id/remaining_time" 132 style="?android:attr/progressBarStyleHorizontal" 133 android:layout_width="60dp" 134 android:layout_height="4dp" 135 android:layout_alignBottom="@id/anchor" 136 android:layout_toEndOf="@id/recording_indicator" 137 android:layout_marginEnd="12dp" 138 android:layout_marginBottom="0.5dp" 139 android:mirrorForRtl="false" 140 android:progressDrawable="@drawable/progress_horizontal" 141 android:indeterminate="false" 142 android:max="100" /> 143 144 <include layout="@layout/program_track_meta" 145 android:layout_width="wrap_content" 146 android:layout_height="wrap_content" 147 android:layout_alignBottom="@id/anchor" 148 android:layout_toEndOf="@id/remaining_time" /> 149 150 <TextView android:id="@+id/program_description" 151 android:layout_width="@dimen/channel_banner_program_description_width" 152 android:layout_height="wrap_content" 153 android:layout_toEndOf="@id/channel_number" 154 android:layout_below="@id/anchor" 155 android:layout_marginTop="-9dp" 156 android:layout_marginBottom="12.5dp" 157 android:maxLines="3" 158 android:lineSpacingExtra="3sp" 159 android:ellipsize="end" 160 android:textColor="@color/channel_banner_dim_text_color" 161 android:textSize="12sp" /> 162 163 </RelativeLayout> 164 165</com.android.tv.ui.ChannelBannerView> 166