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

Commit 9fe7d051 authored by Jeremy Sim's avatar Jeremy Sim Committed by Winson Chung
Browse files

Add support for left-right splits on portrait devices

- Add a config to transpose the split such that you can split left/right
  while in portrait.  This is mostly useful for portrait based foldable
  devices.
- Refactors the divider, split layout, and drag and drop to be based on
  this new config vs the configuration orientation

Bug: 291018646
Test: Manual
Flag: enable_left_right_split_in_portrait
Change-Id: I8b3b81f2510457c31ababb2db1b5e4031d6dc17c
parent d3a0e31b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -6821,6 +6821,9 @@
     window that does not wrap content). -->
    <bool name="config_allowFloatingWindowsFillScreen">false</bool>

    <!-- Whether to enable left-right split in portrait on this device -->
    <bool name="config_leftRightSplitInPortrait">false</bool>

    <!-- Whether scroll haptic feedback is enabled for rotary encoder scrolls on
         {@link MotionEvent#AXIS_SCROLL} generated by {@link InputDevice#SOURCE_ROTARY_ENCODER}
         devices. -->
+1 −0
Original line number Diff line number Diff line
@@ -406,6 +406,7 @@
  <java-symbol type="bool" name="config_supportsMultiWindow" />
  <java-symbol type="bool" name="config_supportsSplitScreenMultiWindow" />
  <java-symbol type="bool" name="config_supportsMultiDisplay" />
  <java-symbol type="bool" name="config_leftRightSplitInPortrait" />
  <java-symbol type="integer" name="config_supportsNonResizableMultiWindow" />
  <java-symbol type="integer" name="config_respectsActivityMinWidthHeightMultiWindow" />
  <java-symbol type="dimen" name="config_minPercentageMultiWindowSupportHeight" />
+7 −0
Original line number Diff line number Diff line
@@ -50,3 +50,10 @@ flag {
    bug: "290220798"
    is_fixed_read_only: true
}

flag {
    name: "enable_left_right_split_in_portrait"
    namespace: "multitasking"
    description: "Enables left/right split in portrait"
    bug: "291018646"
}
+0 −38
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<com.android.wm.shell.legacysplitscreen.DividerView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_height="match_parent"
        android:layout_width="match_parent">

    <View
        style="@style/DockedDividerBackground"
        android:id="@+id/docked_divider_background"
        android:background="@color/split_divider_background"/>

    <com.android.wm.shell.legacysplitscreen.MinimizedDockShadow
        style="@style/DockedDividerMinimizedShadow"
        android:id="@+id/minimized_dock_shadow"
        android:alpha="0"/>

    <com.android.wm.shell.common.split.DividerHandleView
        style="@style/DockedDividerHandle"
        android:id="@+id/docked_divider_handle"
        android:contentDescription="@string/accessibility_divider"
        android:background="@null"/>

</com.android.wm.shell.legacysplitscreen.DividerView>
+4 −5
Original line number Diff line number Diff line
@@ -24,17 +24,16 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <View
            style="@style/DockedDividerBackground"
            android:id="@+id/docked_divider_background"/>

        <com.android.wm.shell.common.split.DividerHandleView
            style="@style/DockedDividerHandle"
            android:id="@+id/docked_divider_handle"
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:layout_gravity="center"
            android:contentDescription="@string/accessibility_divider"
            android:background="@null"/>

        <com.android.wm.shell.common.split.DividerRoundedCorner
            android:id="@+id/docked_divider_rounded_corner"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

Loading