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 22 <SurfaceView 23 android:layout_marginStart="@dimen/magnification_border_size" 24 android:layout_marginTop="@dimen/magnification_border_size" 25 android:id="@+id/surface_view" 26 android:layout_width="match_parent" 27 android:layout_height="match_parent" /> 28 29 <RelativeLayout 30 android:layout_width="match_parent" 31 android:layout_height="match_parent" 32 android:orientation="vertical"> 33 34 <View 35 android:id="@+id/left_handle" 36 android:layout_width="@dimen/magnification_border_size" 37 android:layout_height="match_parent" 38 android:layout_above="@+id/drag_handle" 39 android:background="@color/magnification_border_color" /> 40 41 <View 42 android:id="@+id/top_handle" 43 android:layout_width="match_parent" 44 android:layout_height="@dimen/magnification_border_size" 45 android:background="@color/magnification_border_color" /> 46 47 <View 48 android:id="@+id/right_handle" 49 android:layout_width="@dimen/magnification_border_size" 50 android:layout_height="match_parent" 51 android:layout_above="@+id/drag_handle" 52 android:layout_alignParentEnd="true" 53 android:background="@color/magnification_border_color" /> 54 55 <View 56 android:id="@+id/bottom_handle" 57 android:layout_width="match_parent" 58 android:layout_height="@dimen/magnification_border_size" 59 android:layout_above="@+id/drag_handle" 60 android:background="@color/magnification_border_color" /> 61 62 <View 63 android:id="@+id/drag_handle" 64 android:layout_width="@dimen/magnification_drag_view_width" 65 android:layout_height="@dimen/magnification_drag_view_height" 66 android:layout_alignParentBottom="true" 67 android:layout_centerHorizontal="true" 68 android:background="@color/magnification_border_color" /> 69 70 </RelativeLayout> 71</FrameLayout>