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 android:layout_width="wrap_content" 20 android:layout_height="wrap_content" 21 android:screenReaderFocusable="true"> 22 <View 23 android:layout_width="match_parent" 24 android:layout_height="match_parent" 25 android:layout_margin="@dimen/magnification_outer_border_margin" 26 android:importantForAccessibility="no" 27 android:background="@android:color/black"/> 28 29 <View 30 android:layout_width="match_parent" 31 android:layout_height="match_parent" 32 android:layout_margin="@dimen/magnification_inner_border_margin" 33 android:importantForAccessibility="no" 34 android:background="@color/magnification_border_color"/> 35 36 <RelativeLayout 37 android:layout_width="match_parent" 38 android:layout_height="match_parent" 39 android:importantForAccessibility="noHideDescendants"> 40 41 <View 42 android:id="@+id/left_handle" 43 android:layout_width="@dimen/magnification_border_drag_size" 44 android:layout_height="match_parent" 45 android:layout_above="@+id/bottom_handle"/> 46 47 <View 48 android:id="@+id/top_handle" 49 android:layout_width="match_parent" 50 android:layout_height="@dimen/magnification_border_drag_size" 51 android:layout_alignParentTop="true"/> 52 53 <View 54 android:id="@+id/right_handle" 55 android:layout_width="@dimen/magnification_border_drag_size" 56 android:layout_height="match_parent" 57 android:layout_above="@+id/bottom_handle" 58 android:layout_alignParentEnd="true"/> 59 60 <View 61 android:id="@+id/bottom_handle" 62 android:layout_width="match_parent" 63 android:layout_height="@dimen/magnification_border_drag_size" 64 android:layout_alignParentBottom="true"/> 65 66 <SurfaceView 67 android:id="@+id/surface_view" 68 android:layout_width="match_parent" 69 android:layout_height="match_parent" 70 android:layout_margin="@dimen/magnification_mirror_surface_margin"/> 71 72 </RelativeLayout> 73 74 <ImageView 75 android:id="@+id/drag_handle" 76 android:layout_width="@dimen/magnification_drag_view_size" 77 android:layout_height="@dimen/magnification_drag_view_size" 78 android:layout_margin="@dimen/magnification_inner_border_margin" 79 android:layout_gravity="right|bottom" 80 android:paddingEnd="@dimen/magnifier_drag_handle_padding" 81 android:paddingBottom="@dimen/magnifier_drag_handle_padding" 82 android:scaleType="center" 83 android:importantForAccessibility="no" 84 android:src="@drawable/ic_move_magnification"/> 85 86</FrameLayout>