Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 927730fe authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update the drag handle icon of window magnification"

parents ed08adf8 ca9897fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="oval">
        <shape android:shape="rectangle">
            <solid
                android:color="@android:color/black" />
            <size
+9 −8
Original line number Diff line number Diff line
@@ -73,8 +73,9 @@
        android:id="@+id/drag_handle"
        android:layout_width="@dimen/magnification_drag_view_size"
        android:layout_height="@dimen/magnification_drag_view_size"
        android:layout_margin="@dimen/magnification_outer_border_margin"
        android:layout_gravity="right|bottom"
        android:scaleType="center"
        android:src="@drawable/ic_move" />
        android:src="@drawable/ic_move_magnification"/>

</FrameLayout>
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
    private SurfaceView mMirrorSurfaceView;
    private int mMirrorSurfaceMargin;
    private int mBorderDragSize;
    private int mDragViewSize;
    private int mOuterBorderSize;
    // The boundary of magnification frame.
    private final Rect mMagnificationFrameBoundary = new Rect();
@@ -170,6 +171,8 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
                R.dimen.magnification_mirror_surface_margin);
        mBorderDragSize = mResources.getDimensionPixelSize(
                R.dimen.magnification_border_drag_size);
        mDragViewSize = mResources.getDimensionPixelSize(
                R.dimen.magnification_drag_view_size);
        mOuterBorderSize = mResources.getDimensionPixelSize(
                R.dimen.magnification_outer_border_margin);
    }
@@ -312,6 +315,10 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
        Region regionInsideDragBorder = new Region(mBorderDragSize, mBorderDragSize,
                mMirrorView.getWidth() - mBorderDragSize,
                mMirrorView.getHeight() - mBorderDragSize);
        Rect dragArea = new Rect(mMirrorView.getWidth() - mDragViewSize - mBorderDragSize,
                mMirrorView.getHeight() - mDragViewSize - mBorderDragSize,
                mMirrorView.getWidth(), mMirrorView.getHeight());
        regionInsideDragBorder.op(dragArea, Region.Op.DIFFERENCE);
        return regionInsideDragBorder;
    }