1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2020 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<!-- Layout for TvPipMenuView --> 18<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 android:id="@+id/tv_pip_menu" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent" 22 android:gravity="center|top"> 23 24 <!-- Matches the PiP app content --> 25 <FrameLayout 26 android:id="@+id/tv_pip" 27 android:layout_width="0dp" 28 android:layout_height="0dp" 29 android:layout_marginTop="@dimen/pip_menu_outer_space" 30 android:layout_marginStart="@dimen/pip_menu_outer_space" 31 android:layout_marginEnd="@dimen/pip_menu_outer_space"> 32 33 <View 34 android:id="@+id/tv_pip_menu_background" 35 android:layout_width="match_parent" 36 android:layout_height="match_parent" 37 android:background="@color/tv_pip_menu_background" 38 android:alpha="0"/> 39 40 <View 41 android:id="@+id/tv_pip_menu_dim_layer" 42 android:layout_width="match_parent" 43 android:layout_height="match_parent" 44 android:background="@color/tv_pip_menu_dim_layer" 45 android:alpha="0"/> 46 47 <com.android.internal.widget.RecyclerView 48 android:id="@+id/tv_pip_menu_action_buttons" 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:layout_gravity="center" 52 android:clipToPadding="false" 53 android:alpha="0" 54 android:contentDescription="@string/a11y_pip_menu_entered"/> 55 </FrameLayout> 56 57 <!-- Frame around the content, just overlapping the corners to make them round --> 58 <View 59 android:id="@+id/tv_pip_border" 60 android:layout_width="0dp" 61 android:layout_height="0dp" 62 android:layout_marginTop="@dimen/pip_menu_outer_space_frame" 63 android:layout_marginStart="@dimen/pip_menu_outer_space_frame" 64 android:layout_marginEnd="@dimen/pip_menu_outer_space_frame" 65 android:background="@drawable/tv_pip_menu_border"/> 66 67 <!-- Temporarily extending the background to show an edu text hint for opening the menu --> 68 <FrameLayout 69 android:id="@+id/tv_pip_menu_edu_text_container" 70 android:layout_width="match_parent" 71 android:layout_height="match_parent" 72 android:layout_below="@+id/tv_pip" 73 android:layout_alignBottom="@+id/tv_pip_menu_frame" 74 android:layout_alignStart="@+id/tv_pip" 75 android:layout_alignEnd="@+id/tv_pip" 76 android:background="@color/tv_pip_menu_background" 77 android:paddingBottom="@dimen/pip_menu_border_width" 78 android:paddingTop="@dimen/pip_menu_border_width"/> 79 80 <!-- Frame around the PiP content + edu text hint - used to highlight open menu --> 81 <View 82 android:id="@+id/tv_pip_menu_frame" 83 android:layout_width="match_parent" 84 android:layout_height="match_parent" 85 android:layout_margin="@dimen/pip_menu_outer_space_frame" 86 android:background="@drawable/tv_pip_menu_border"/> 87 88 <!-- Move menu --> 89 <com.android.wm.shell.common.TvWindowMenuActionButton 90 android:id="@+id/tv_pip_menu_done_button" 91 android:layout_width="wrap_content" 92 android:layout_height="wrap_content" 93 android:layout_centerHorizontal="true" 94 android:layout_centerVertical="true" 95 android:src="@drawable/pip_ic_close_white" 96 android:visibility="gone" 97 android:text="@string/a11y_action_pip_move_done" /> 98 99 <ImageView 100 android:id="@+id/tv_pip_menu_arrow_up" 101 android:layout_width="@dimen/pip_menu_arrow_size" 102 android:layout_height="@dimen/pip_menu_arrow_size" 103 android:layout_centerHorizontal="true" 104 android:layout_alignParentTop="true" 105 android:alpha="0" 106 android:contentDescription="@string/a11y_action_pip_move_up"/> 107 108 <ImageView 109 android:id="@+id/tv_pip_menu_arrow_right" 110 android:layout_width="@dimen/pip_menu_arrow_size" 111 android:layout_height="@dimen/pip_menu_arrow_size" 112 android:layout_centerVertical="true" 113 android:layout_alignParentRight="true" 114 android:alpha="0" 115 android:contentDescription="@string/a11y_action_pip_move_right"/> 116 117 <ImageView 118 android:id="@+id/tv_pip_menu_arrow_down" 119 android:layout_width="@dimen/pip_menu_arrow_size" 120 android:layout_height="@dimen/pip_menu_arrow_size" 121 android:layout_centerHorizontal="true" 122 android:layout_alignParentBottom="true" 123 android:alpha="0" 124 android:contentDescription="@string/a11y_action_pip_move_down"/> 125 126 <ImageView 127 android:id="@+id/tv_pip_menu_arrow_left" 128 android:layout_width="@dimen/pip_menu_arrow_size" 129 android:layout_height="@dimen/pip_menu_arrow_size" 130 android:layout_centerVertical="true" 131 android:layout_alignParentLeft="true" 132 android:alpha="0" 133 android:contentDescription="@string/a11y_action_pip_move_left"/> 134</RelativeLayout> 135