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    xmlns:tv="http://schemas.android.com/apk/res-auto"
20    android:id="@+id/play_controls"
21    style="@style/menu_row_contents_view"
22    android:layoutDirection="ltr">
23
24    <TextView
25        android:id="@+id/time_text"
26        android:layout_width="@dimen/play_controls_time_width"
27        android:layout_height="wrap_content"
28        android:layout_alignParentTop="true"
29        android:layout_alignStart="@+id/body"
30        android:layout_marginBottom="@dimen/play_controls_time_bottom_margin"
31        android:gravity="center"
32        android:maxLines="1"
33        android:textColor="@color/play_controls_time_text_color"
34        android:textSize="@dimen/play_controls_time_text_size"
35        android:fontFamily="@string/font" />
36
37    <RelativeLayout
38        android:id="@id/body"
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        <com.android.tv.menu.PlaybackProgressBar
46            android:id="@+id/progress"
47            android:layout_width="match_parent"
48            android:layout_height="@dimen/play_controls_progress_height"
49            android:layout_alignParentTop="true"
50            tv:progressDrawable="@drawable/playback_progress_bar" />
51        <TextView
52            android:id="@+id/background"
53            android:layout_width="match_parent"
54            android:layout_height="@dimen/play_controls_button_height"
55            android:layout_below="@id/progress"
56            android:background="@drawable/play_controls_body_background"
57            android:gravity="center"
58            android:maxLines="1"
59            android:textColor="@color/play_controls_unavailable_message_text_color"
60            android:textSize="@dimen/play_controls_unavailable_message_text_size"
61            android:fontFamily="@string/font" />
62        <TextView
63            android:id="@+id/program_start_time"
64            android:layout_width="wrap_content"
65            android:layout_height="wrap_content"
66            android:layout_alignParentStart="true"
67            android:layout_below="@id/progress"
68            android:layout_marginStart="@dimen/play_controls_program_time_margin_start"
69            android:layout_marginTop="@dimen/play_controls_program_time_margin_top"
70            android:maxLines="1"
71            android:textColor="@color/play_controls_rec_time_text_color"
72            android:textSize="@dimen/play_controls_rec_time_text_size"
73            android:fontFamily="@string/font" />
74        <TextView
75            android:id="@+id/program_end_time"
76            android:layout_width="wrap_content"
77            android:layout_height="wrap_content"
78            android:layout_alignParentEnd="true"
79            android:layout_below="@id/progress"
80            android:layout_marginEnd="@dimen/play_controls_program_time_margin_end"
81            android:layout_marginTop="@dimen/play_controls_program_time_margin_top"
82            android:maxLines="1"
83            android:textColor="@color/play_controls_rec_time_text_color"
84            android:textSize="@dimen/play_controls_rec_time_text_size"
85            android:fontFamily="@string/font" />
86
87        <com.android.tv.menu.PlayControlsButton
88            android:id="@+id/play_pause"
89            android:layout_width="@dimen/play_controls_button_width"
90            android:layout_height="@dimen/play_controls_button_height"
91            android:layout_below="@id/progress"
92            android:layout_marginLeft="@dimen/play_controls_button_compact_margin"
93            android:layout_marginRight="@dimen/play_controls_button_compact_margin"
94            android:layout_centerHorizontal="true" />
95        <com.android.tv.menu.PlayControlsButton
96            android:id="@+id/rewind"
97            android:layout_width="@dimen/play_controls_button_width"
98            android:layout_height="@dimen/play_controls_button_height"
99            android:layout_below="@id/progress"
100            android:layout_marginLeft="@dimen/play_controls_button_compact_margin"
101            android:layout_marginRight="@dimen/play_controls_button_compact_margin"
102            android:layout_toStartOf="@id/play_pause" />
103        <com.android.tv.menu.PlayControlsButton
104            android:id="@+id/jump_previous"
105            android:layout_width="@dimen/play_controls_button_width"
106            android:layout_height="@dimen/play_controls_button_height"
107            android:layout_below="@id/progress"
108            android:layout_marginLeft="@dimen/play_controls_button_compact_margin"
109            android:layout_marginRight="@dimen/play_controls_button_compact_margin"
110            android:layout_toStartOf="@id/rewind" />
111        <com.android.tv.menu.PlayControlsButton
112            android:id="@+id/fast_forward"
113            android:layout_width="@dimen/play_controls_button_width"
114            android:layout_height="@dimen/play_controls_button_height"
115            android:layout_below="@id/progress"
116            android:layout_marginLeft="@dimen/play_controls_button_compact_margin"
117            android:layout_marginRight="@dimen/play_controls_button_compact_margin"
118            android:layout_toEndOf="@id/play_pause" />
119        <com.android.tv.menu.PlayControlsButton
120            android:id="@+id/jump_next"
121            android:layout_width="@dimen/play_controls_button_width"
122            android:layout_height="@dimen/play_controls_button_height"
123            android:layout_below="@id/progress"
124            android:layout_marginLeft="@dimen/play_controls_button_compact_margin"
125            android:layout_marginRight="@dimen/play_controls_button_compact_margin"
126            android:layout_toEndOf="@id/fast_forward" />
127        <com.android.tv.menu.PlayControlsButton
128            android:id="@+id/record"
129            android:layout_width="@dimen/play_controls_button_width"
130            android:layout_height="@dimen/play_controls_button_height"
131            android:layout_below="@id/progress"
132            android:layout_marginLeft="@dimen/play_controls_button_compact_margin"
133            android:layout_marginRight="@dimen/play_controls_button_compact_margin"
134            android:layout_toEndOf="@id/jump_next" />
135    </RelativeLayout>
136
137    <View
138        android:id="@+id/time_indicator"
139        android:layout_width="@dimen/play_controls_time_indicator_width"
140        android:layout_height="@dimen/play_controls_time_indicator_height"
141        android:layout_marginTop="@dimen/play_controls_time_indicator_top_margin"
142        android:layout_alignTop="@id/body"
143        android:layout_alignStart="@id/body"
144        android:background="@drawable/play_controls_time_indicator"
145        android:elevation="1dp" />
146</RelativeLayout>
147