aboutsummaryrefslogtreecommitdiff
path: root/res/layout/play_controls.xml
blob: 2354ad5e29597c449859bc6b83e2cf77c417153a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?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.
  -->

<com.android.tv.menu.PlayControlsRowView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:focusable="true"
    android:descendantFocusability="afterDescendants">

    <!-- Although the text leading can be changed accroding to the text size,
         we decided to set fixed layout_height since it doesn't make a big difference,
         and it makes code more simpler. -->
    <TextView
        android:id="@+id/title"
        android:layout_width="@dimen/menu_row_title_width"
        android:layout_height="@dimen/menu_row_title_height"
        android:paddingBottom="@dimen/menu_row_title_padding_bottom"
        android:fontFamily="@string/condensed_font"
        android:textAlignment="viewStart"
        android:gravity="start|bottom"
        android:textColor="@color/menu_row_title"
        android:textSize="@dimen/menu_row_title_text_size_deselected"
        android:transformPivotX="@dimen/menu_row_title_transform_pivot_x"
        android:transformPivotY="@dimen/menu_row_title_transform_pivot_y"
        android:text="@string/menu_title_play_controls" />

    <!-- The animation of this view includes an alpha animation, while one of its child is scaled
         to out of bounds of this view. This results in visual artifacts while animating, because
         alpha animation only occurs within the bounds of the view.

         To work around, this view takes up extra space up to its neighbors using negative margins,
         and compensate the same space with padding.
    -->
    <include layout="@layout/play_controls_contents"/>

</com.android.tv.menu.PlayControlsRowView>