Winson Chung | 15504af | 2016-11-02 18:11:36 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
Winson Chung | a29eb98 | 2016-12-14 12:01:27 -0800 | [diff] [blame] | 2 | <!-- Copyright (C) 2016 The Android Open Source Project |
Winson Chung | 15504af | 2016-11-02 18:11:36 -0700 | [diff] [blame] | 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 | --> |
Winson Chung | 15504af | 2016-11-02 18:11:36 -0700 | [diff] [blame] | 16 | <FrameLayout |
| 17 | xmlns:android="http://schemas.android.com/apk/res/android" |
Mady Mellor | 81d4061 | 2017-03-10 15:14:10 -0800 | [diff] [blame] | 18 | android:id="@+id/background" |
Winson Chung | 15504af | 2016-11-02 18:11:36 -0700 | [diff] [blame] | 19 | android:layout_width="match_parent" |
Mady Mellor | 81d4061 | 2017-03-10 15:14:10 -0800 | [diff] [blame] | 20 | android:layout_height="match_parent"> |
Winson Chung | a29eb98 | 2016-12-14 12:01:27 -0800 | [diff] [blame] | 21 | |
Hongwei Wang | 5051db6 | 2019-06-28 12:27:20 -0700 | [diff] [blame] | 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"> |
Winson Chung | a29eb98 | 2016-12-14 12:01:27 -0800 | [diff] [blame] | 29 | |
Hongwei Wang | 5051db6 | 2019-06-28 12:27:20 -0700 | [diff] [blame] | 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> |
Mady Mellor | 81d4061 | 2017-03-10 15:14:10 -0800 | [diff] [blame] | 46 | |
Hongwei Wang | 5051db6 | 2019-06-28 12:27:20 -0700 | [diff] [blame] | 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> |
Mady Mellor | 637cd48 | 2017-03-21 10:39:42 -0700 | [diff] [blame] | 63 | |
Hongwei Wang | a6e034e | 2019-06-20 13:18:43 -0700 | [diff] [blame] | 64 | <ImageButton |
Winson Chung | a556fe6 | 2017-12-19 14:46:23 -0800 | [diff] [blame] | 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 | |
Hongwei Wang | a6e034e | 2019-06-20 13:18:43 -0700 | [diff] [blame] | 74 | <ImageButton |
Winson Chung | a556fe6 | 2017-12-19 14:46:23 -0800 | [diff] [blame] | 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" /> |
Mady Mellor | 637cd48 | 2017-03-21 10:39:42 -0700 | [diff] [blame] | 83 | |
Ben Lin | 906a02b | 2020-05-20 13:22:16 -0700 | [diff] [blame] | 84 | <!--TODO (b/156917828): Add content description for a11y purposes?--> |
| 85 | <ImageButton |
| 86 | android:id="@+id/resize_handle" |
Ben Lin | 39419af | 2020-05-21 16:07:44 -0700 | [diff] [blame] | 87 | android:layout_width="@dimen/pip_resize_handle_size" |
| 88 | android:layout_height="@dimen/pip_resize_handle_size" |
Ben Lin | 906a02b | 2020-05-20 13:22:16 -0700 | [diff] [blame] | 89 | android:layout_gravity="top|start" |
Ben Lin | 39419af | 2020-05-21 16:07:44 -0700 | [diff] [blame] | 90 | android:layout_margin="@dimen/pip_resize_handle_margin" |
Ben Lin | 906a02b | 2020-05-20 13:22:16 -0700 | [diff] [blame] | 91 | android:src="@drawable/pip_resize_handle" |
| 92 | android:background="?android:selectableItemBackgroundBorderless" /> |
Winson Chung | 15504af | 2016-11-02 18:11:36 -0700 | [diff] [blame] | 93 | </FrameLayout> |