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<FrameLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    android:id="@+id/background"
20    android:layout_width="match_parent"
21    android:layout_height="match_parent">
22
23    <!-- Menu layout -->
24    <FrameLayout
25        android:id="@+id/menu_container"
26        android:layout_width="match_parent"
27        android:layout_height="match_parent"
28        android:forceHasOverlappingRendering="false"
29        android:accessibilityTraversalAfter="@id/dismiss">
30
31        <!-- The margins for this container is calculated in the code depending on whether the
32             actions_container is visible. -->
33        <FrameLayout
34            android:id="@+id/expand_container"
35            android:layout_width="match_parent"
36            android:layout_height="match_parent">
37            <ImageButton
38                android:id="@+id/expand_button"
39                android:layout_width="@dimen/pip_expand_action_size"
40                android:layout_height="@dimen/pip_expand_action_size"
41                android:layout_gravity="center"
42                android:contentDescription="@string/pip_phone_expand"
43                android:gravity="center"
44                android:src="@drawable/pip_expand"
45                android:background="?android:selectableItemBackgroundBorderless" />
46        </FrameLayout>
47
48        <FrameLayout
49            android:id="@+id/actions_container"
50            android:layout_width="match_parent"
51            android:layout_height="@dimen/pip_action_size"
52            android:layout_gravity="bottom"
53            android:visibility="invisible">
54            <LinearLayout
55                android:id="@+id/actions_group"
56                android:layout_width="wrap_content"
57                android:layout_height="match_parent"
58                android:layout_gravity="center_horizontal"
59                android:orientation="horizontal"
60                android:divider="@android:color/transparent"
61                android:showDividers="middle" />
62        </FrameLayout>
63    </FrameLayout>
64
65    <LinearLayout
66        android:id="@+id/top_end_container"
67        android:layout_gravity="top|end"
68        android:layout_width="match_parent"
69        android:layout_height="wrap_content"
70        android:orientation="horizontal">
71
72        <ImageButton
73            android:id="@+id/settings"
74            android:layout_width="@dimen/pip_action_size"
75            android:layout_height="@dimen/pip_action_size"
76            android:contentDescription="@string/pip_phone_settings"
77            android:layout_gravity="top|start"
78            android:gravity="center"
79            android:src="@drawable/pip_ic_settings"
80            android:background="?android:selectableItemBackgroundBorderless" />
81
82    </LinearLayout>
83
84    <!--TODO (b/156917828): Add content description for a11y purposes?-->
85    <ImageButton
86        android:id="@+id/resize_handle"
87        android:layout_width="@dimen/pip_resize_handle_size"
88        android:layout_height="@dimen/pip_resize_handle_size"
89        android:layout_gravity="top|start"
90        android:layout_margin="@dimen/pip_resize_handle_margin"
91        android:padding="@dimen/pip_resize_handle_padding"
92        android:src="@drawable/pip_resize_handle"
93        android:background="?android:selectableItemBackgroundBorderless" />
94
95    <ImageButton
96        android:id="@+id/dismiss"
97        android:layout_width="@dimen/pip_action_size"
98        android:layout_height="@dimen/pip_action_size"
99        android:contentDescription="@string/pip_phone_close"
100        android:layout_gravity="top|end"
101        android:gravity="center"
102        android:src="@drawable/pip_ic_close_white"
103        android:background="?android:selectableItemBackgroundBorderless" />
104</FrameLayout>
105