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 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 android:id="@+id/play_controls" 20 style="@style/menu_row_contents_view" 21 android:layoutDirection="ltr"> 22 23 <TextView 24 android:id="@+id/time_text" 25 android:layout_width="@dimen/play_controls_time_width" 26 android:layout_height="wrap_content" 27 android:layout_alignParentTop="true" 28 android:layout_alignStart="@+id/body" 29 android:layout_marginBottom="@dimen/play_controls_time_bottom_margin" 30 android:gravity="center" 31 android:singleLine="true" 32 android:textColor="@color/play_controls_time_text_color" 33 android:textSize="@dimen/play_controls_time_text_size" 34 android:fontFamily="@string/font" /> 35 36 <LinearLayout 37 android:id="@id/body" 38 android:orientation="vertical" 39 android:layout_width="@dimen/play_controls_width" 40 android:layout_height="wrap_content" 41 android:layout_below="@id/time_text" 42 android:layout_centerHorizontal="true" 43 android:background="@drawable/play_controls_body_shape"> 44 45 <RelativeLayout 46 android:layout_width="match_parent" 47 android:layout_height="@dimen/play_controls_progress_height"> 48 49 <ImageView 50 android:id="@+id/timeline_bg_start" 51 android:layout_width="wrap_content" 52 android:layout_height="match_parent" 53 android:layout_alignParentStart="true" 54 android:src="@color/play_controls_progress_bar_background" /> 55 <ImageView 56 android:id="@+id/watched" 57 android:layout_width="wrap_content" 58 android:layout_height="match_parent" 59 android:layout_toEndOf="@id/timeline_bg_start" 60 android:src="@color/play_controls_progress_bar_watched" /> 61 <ImageView 62 android:id="@+id/buffered" 63 android:layout_width="wrap_content" 64 android:layout_height="match_parent" 65 android:layout_toEndOf="@id/watched" 66 android:src="@color/play_controls_progress_bar_buffered" /> 67 <ImageView 68 android:id="@+id/timeline_bg_end" 69 android:layout_width="wrap_content" 70 android:layout_height="match_parent" 71 android:layout_alignParentEnd="true" 72 android:layout_toEndOf="@id/buffered" 73 android:src="@color/play_controls_progress_bar_background" /> 74 75 </RelativeLayout> 76 77 <FrameLayout 78 android:id="@+id/background" 79 android:layout_width="match_parent" 80 android:layout_height="wrap_content" 81 android:background="@drawable/play_controls_body_background"> 82 83 <TextView 84 android:id="@+id/program_start_time" 85 android:layout_width="wrap_content" 86 android:layout_height="wrap_content" 87 android:layout_marginStart="@dimen/play_controls_program_time_margin_start" 88 android:layout_marginTop="@dimen/play_controls_program_time_margin_top" 89 android:singleLine="true" 90 android:textColor="@color/play_controls_rec_time_text_color" 91 android:textSize="@dimen/play_controls_rec_time_text_size" 92 android:fontFamily="@string/font" /> 93 <TextView 94 android:id="@+id/program_end_time" 95 android:layout_width="wrap_content" 96 android:layout_height="wrap_content" 97 android:layout_marginEnd="@dimen/play_controls_program_time_margin_end" 98 android:layout_marginTop="@dimen/play_controls_program_time_margin_top" 99 android:layout_gravity="end" 100 android:singleLine="true" 101 android:textColor="@color/play_controls_rec_time_text_color" 102 android:textSize="@dimen/play_controls_rec_time_text_size" 103 android:fontFamily="@string/font" /> 104 105 <LinearLayout 106 android:id="@+id/play_control_bar" 107 android:orientation="horizontal" 108 android:layout_width="wrap_content" 109 android:layout_height="@dimen/play_controls_button_height" 110 android:layout_gravity="center"> 111 112 <com.android.tv.menu.PlayControlsButton 113 android:id="@+id/jump_previous" 114 android:layout_width="@dimen/play_controls_button_width" 115 android:layout_height="match_parent" /> 116 <com.android.tv.menu.PlayControlsButton 117 android:id="@+id/rewind" 118 android:layout_width="@dimen/play_controls_button_width" 119 android:layout_height="match_parent" 120 android:layout_marginStart="@dimen/play_controls_button_start_margin" /> 121 <com.android.tv.menu.PlayControlsButton 122 android:id="@+id/play_pause" 123 android:layout_width="@dimen/play_controls_button_width" 124 android:layout_height="match_parent" 125 android:layout_marginStart="@dimen/play_controls_button_start_margin" /> 126 <com.android.tv.menu.PlayControlsButton 127 android:id="@+id/fast_forward" 128 android:layout_width="@dimen/play_controls_button_width" 129 android:layout_height="match_parent" 130 android:layout_marginStart="@dimen/play_controls_button_start_margin" /> 131 <com.android.tv.menu.PlayControlsButton 132 android:id="@+id/jump_next" 133 android:layout_width="@dimen/play_controls_button_width" 134 android:layout_height="match_parent" 135 android:layout_marginStart="@dimen/play_controls_button_start_margin" /> 136 137 </LinearLayout> 138 139 <TextView 140 android:id="@+id/unavailable_text" 141 android:layout_width="wrap_content" 142 android:layout_height="wrap_content" 143 android:layout_gravity="center" 144 android:singleLine="true" 145 android:textColor="@color/play_controls_unavailable_message_text_color" 146 android:textSize="@dimen/play_controls_unavailable_message_text_size" 147 android:fontFamily="@string/font" 148 android:visibility="gone" 149 android:text="@string/play_controls_unavailable" /> 150 </FrameLayout> 151 </LinearLayout> 152 153 <ImageView 154 android:id="@+id/time_indicator" 155 android:layout_width="wrap_content" 156 android:layout_height="wrap_content" 157 android:layout_marginTop="@dimen/play_controls_time_indicator_top_margin" 158 android:layout_alignTop="@id/body" 159 android:layout_alignStart="@id/body" 160 android:background="@drawable/play_controls_time_indicator" 161 android:visibility="invisible" 162 android:elevation="1dp" /> 163 </RelativeLayout> 164