• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<FrameLayout
17    xmlns:android="http://schemas.android.com/apk/res/android"
18    android:id="@+id/background"
19    android:layout_width="match_parent"
20    android:layout_height="match_parent">
21
22    <!-- Menu layout -->
23    <FrameLayout
24        android:id="@+id/menu_container"
25        android:layout_width="match_parent"
26        android:layout_height="match_parent"
27        android:forceHasOverlappingRendering="false"
28        android:accessibilityTraversalAfter="@id/dismiss">
29
30        <!-- The margins for this container is calculated in the code depending on whether the
31             actions_container is visible. -->
32        <FrameLayout
33            android:id="@+id/expand_container"
34            android:layout_width="match_parent"
35            android:layout_height="match_parent">
36            <ImageButton
37                android:id="@+id/expand_button"
38                android:layout_width="60dp"
39                android:layout_height="60dp"
40                android:layout_gravity="center"
41                android:contentDescription="@string/pip_phone_expand"
42                android:padding="10dp"
43                android:src="@drawable/pip_expand"
44                android:background="?android:selectableItemBackgroundBorderless" />
45        </FrameLayout>
46
47        <FrameLayout
48            android:id="@+id/actions_container"
49            android:layout_width="match_parent"
50            android:layout_height="@dimen/pip_action_size"
51            android:layout_gravity="bottom"
52            android:visibility="invisible">
53            <LinearLayout
54                android:id="@+id/actions_group"
55                android:layout_width="wrap_content"
56                android:layout_height="match_parent"
57                android:layout_gravity="center_horizontal"
58                android:orientation="horizontal"
59                android:divider="@android:color/transparent"
60                android:showDividers="middle" />
61        </FrameLayout>
62    </FrameLayout>
63
64    <ImageButton
65        android:id="@+id/settings"
66        android:layout_width="@dimen/pip_action_size"
67        android:layout_height="@dimen/pip_action_size"
68        android:layout_gravity="top|start"
69        android:padding="@dimen/pip_action_padding"
70        android:contentDescription="@string/pip_phone_settings"
71        android:src="@drawable/ic_settings"
72        android:background="?android:selectableItemBackgroundBorderless" />
73
74    <ImageButton
75        android:id="@+id/dismiss"
76        android:layout_width="@dimen/pip_action_size"
77        android:layout_height="@dimen/pip_action_size"
78        android:layout_gravity="top|end"
79        android:padding="@dimen/pip_action_padding"
80        android:contentDescription="@string/pip_phone_close"
81        android:src="@drawable/ic_close_white"
82        android:background="?android:selectableItemBackgroundBorderless" />
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:src="@drawable/pip_resize_handle"
92        android:background="?android:selectableItemBackgroundBorderless" />
93</FrameLayout>
94