1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2019 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 18<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:layout_width="wrap_content" 21 android:layout_height="wrap_content"> 22 23 <View 24 android:id="@+id/magnification_inner_border" 25 android:layout_width="match_parent" 26 android:layout_height="match_parent" 27 android:layout_margin="@dimen/magnification_outer_border_margin" 28 android:background="@drawable/accessibility_window_magnification_background"/> 29 30 <RelativeLayout 31 android:layout_width="match_parent" 32 android:layout_height="match_parent"> 33 34 <View 35 android:id="@+id/left_handle" 36 android:layout_width="@dimen/magnification_border_drag_size" 37 android:layout_height="match_parent" 38 android:layout_alignParentStart="true"/> 39 40 <View 41 android:id="@+id/top_handle" 42 android:layout_width="match_parent" 43 android:layout_height="@dimen/magnification_border_drag_size" 44 android:layout_alignParentTop="true" 45 android:accessibilityTraversalAfter="@id/left_handle"/> 46 47 <View 48 android:id="@+id/right_handle" 49 android:layout_width="@dimen/magnification_border_drag_size" 50 android:layout_height="match_parent" 51 android:layout_alignParentEnd="true" 52 android:accessibilityTraversalAfter="@id/top_handle"/> 53 54 <View 55 android:id="@+id/bottom_handle" 56 android:layout_width="match_parent" 57 android:layout_height="@dimen/magnification_border_drag_size" 58 android:layout_alignParentBottom="true" 59 android:accessibilityTraversalAfter="@id/right_handle"/> 60 61 <SurfaceView 62 android:id="@+id/surface_view" 63 android:layout_width="match_parent" 64 android:layout_height="match_parent" 65 android:layout_margin="@dimen/magnification_mirror_surface_margin"/> 66 </RelativeLayout> 67 68 <ImageView 69 android:id="@+id/top_right_corner" 70 android:background="@drawable/accessibility_window_magnification_drag_corner_background" 71 android:layout_width="wrap_content" 72 android:layout_height="wrap_content" 73 android:layout_margin="@dimen/magnification_drag_corner_margin" 74 android:layout_gravity="right|top" 75 android:scaleType="center" 76 android:contentDescription="@string/magnification_drag_corner_to_resize" 77 android:src="@drawable/ic_arrow_top_right_and_bottom_left" 78 android:accessibilityTraversalAfter="@id/top_left_corner"/> 79 80 <ImageView 81 android:id="@+id/top_left_corner" 82 android:background="@drawable/accessibility_window_magnification_drag_corner_background" 83 android:layout_width="wrap_content" 84 android:layout_height="wrap_content" 85 android:layout_margin="@dimen/magnification_drag_corner_margin" 86 android:layout_gravity="left|top" 87 android:scaleType="center" 88 android:contentDescription="@string/magnification_drag_corner_to_resize" 89 android:src="@drawable/ic_arrow_top_left_and_bottom_right" 90 android:accessibilityTraversalAfter="@id/bottom_handle"/> 91 92 <ImageView 93 android:id="@+id/bottom_right_corner" 94 android:background="@drawable/accessibility_window_magnification_drag_corner_background" 95 android:layout_width="wrap_content" 96 android:layout_height="wrap_content" 97 android:layout_margin="@dimen/magnification_drag_corner_margin" 98 android:layout_gravity="right|bottom" 99 android:scaleType="center" 100 android:contentDescription="@string/magnification_drag_corner_to_resize" 101 android:src="@drawable/ic_arrow_top_left_and_bottom_right" 102 android:accessibilityTraversalAfter="@id/top_right_corner"/> 103 104 <ImageView 105 android:id="@+id/bottom_left_corner" 106 android:background="@drawable/accessibility_window_magnification_drag_corner_background" 107 android:layout_width="wrap_content" 108 android:layout_height="wrap_content" 109 android:layout_margin="@dimen/magnification_drag_corner_margin" 110 android:layout_gravity="left|bottom" 111 android:scaleType="center" 112 android:contentDescription="@string/magnification_drag_corner_to_resize" 113 android:src="@drawable/ic_arrow_top_right_and_bottom_left" 114 android:accessibilityTraversalAfter="@id/bottom_right_corner"/> 115 116 <ImageView 117 android:id="@+id/drag_handle" 118 android:layout_width="@dimen/magnification_drag_view_size" 119 android:layout_height="@dimen/magnification_drag_view_size" 120 android:layout_gravity="right|bottom" 121 android:padding="@dimen/magnifier_drag_handle_padding" 122 android:scaleType="center" 123 android:src="@drawable/ic_move_magnification" 124 android:background="@drawable/accessibility_window_magnification_drag_handle_background_inset"/> 125 126 <ImageView 127 android:id="@+id/close_button" 128 android:layout_width="40dp" 129 android:layout_height="40dp" 130 android:layout_margin="30dp" 131 android:padding="@dimen/magnification_switch_button_padding" 132 android:layout_gravity="right|bottom" 133 android:scaleType="center" 134 android:visibility="gone" 135 android:background="@drawable/accessibility_magnifier_btn_bg" 136 android:src="@drawable/ic_magnification_menu_close" /> 137</FrameLayout> 138