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

Commit f05fc637 authored by Shuming Hao's avatar Shuming Hao
Browse files

Update split handle touch target size

This CL updates split devider handle region specs, which is used to calculate the touch target position and size. The region is set to 48*80, or 80*24 in portrait desktop mode to avoid colliding with the app handle.

Bug: 338079912
Test: Manually
Flag: EXEMPT bugfix
Change-Id: Ibbf653e670ab6e481ed92e21fad775fb3a922d32
parent 55590219
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -92,8 +92,11 @@
    <dimen name="docked_divider_handle_width">16dp</dimen>
    <dimen name="docked_divider_handle_height">2dp</dimen>

    <dimen name="split_divider_handle_region_width">96dp</dimen>
    <dimen name="split_divider_handle_region_width">80dp</dimen>
    <dimen name="split_divider_handle_region_height">48dp</dimen>
    <!-- The divider touch zone height is intentionally halved in portrait to avoid colliding
         with the app handle.-->
    <dimen name="desktop_mode_portrait_split_divider_handle_region_height">24dp</dimen>

    <!-- Divider handle size for split screen -->
    <dimen name="split_divider_handle_width">40dp</dimen>
+4 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import com.android.internal.protolog.ProtoLog;
import com.android.wm.shell.R;
import com.android.wm.shell.protolog.ShellProtoLogGroup;
import com.android.wm.shell.shared.animation.Interpolators;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;

/**
 * Divider for multi window splits.
@@ -228,6 +229,8 @@ public class DividerView extends FrameLayout implements View.OnTouchListener {
                : R.dimen.split_divider_handle_region_width);
        mHandleRegionHeight = getResources().getDimensionPixelSize(isLeftRightSplit
                ? R.dimen.split_divider_handle_region_width
                : DesktopModeStatus.canEnterDesktopMode(mContext)
                        ? R.dimen.desktop_mode_portrait_split_divider_handle_region_height
                        : R.dimen.split_divider_handle_region_height);
    }