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

Commit 1fcbab6a authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Implement divider UX interactions

- Update visuals to spec
- Divider lifts when touching
- Implement basic version of snap points and animations
- Implement touch conflict behavior: If touched around 48x48dp
area around the handle, the divider handles all these touches.
If touched outside of the black background divider, touch goes
directly to underlying window. If touch on the black background
divider, touch is considered slippery and thus the window in
which the touch trace moves gets the touches.

Change-Id: I0307c191ae032672c4b73d439c23cf9833d3fce6
parent a7262a89
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -45,8 +45,12 @@
    <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
    <dimen name="status_bar_edge_ignore">5dp</dimen>

    <!-- Width of a divider bar used to resize docked stacks. -->
    <dimen name="docked_stack_divider_thickness">24dp</dimen>
    <!-- Width of the window of the divider bar used to resize docked stacks. -->
    <dimen name="docked_stack_divider_thickness">48dp</dimen>

    <!-- How much the content in the divider is inset from the window bounds when resting. Used to
         calculate the bounds of the stacks-->
    <dimen name="docked_stack_divider_insets">18dp</dimen>

    <!-- Min width for a tablet device -->
    <dimen name="min_xlarge_screen_width">800dp</dimen>
+1 −1
Original line number Diff line number Diff line
@@ -1481,6 +1481,7 @@
  <java-symbol type="bool" name="config_supportAutoRotation" />
  <java-symbol type="bool" name="target_honeycomb_needs_options_menu" />
  <java-symbol type="dimen" name="docked_stack_divider_thickness" />
  <java-symbol type="dimen" name="docked_stack_divider_insets" />
  <java-symbol type="dimen" name="navigation_bar_height" />
  <java-symbol type="dimen" name="navigation_bar_height_landscape" />
  <java-symbol type="dimen" name="navigation_bar_width" />
@@ -1724,7 +1725,6 @@
  <java-symbol type="integer" name="config_undockedHdmiRotation" />
  <java-symbol type="integer" name="config_virtualKeyQuietTimeMillis" />
  <java-symbol type="layout" name="am_compat_mode_dialog" />
  <java-symbol type="layout" name="docked_stack_divider" />
  <java-symbol type="layout" name="launch_warning" />
  <java-symbol type="layout" name="safe_mode" />
  <java-symbol type="layout" name="simple_list_item_2_single_choice" />
+22 −0
Original line number Diff line number Diff line
<!--
Copyright (C) 2015 The Android Open Source Project

   Licensed under the Apache License, Version 2 (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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
    <size android:height="@dimen/docked_divider_handle_height"
        android:width="@dimen/docked_divider_handle_width" />
    <corners radius="1dp" />
    <solid android:color="@color/docked_divider_handle" />
</shape>
 No newline at end of file
+18 −4
Original line number Diff line number Diff line
@@ -14,8 +14,22 @@
     limitations under the License.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="@*android:dimen/docked_stack_divider_thickness"
<com.android.systemui.stackdivider.DividerView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_height="match_parent"
        android:background="@android:color/black"
        />
        android:layout_width="match_parent">

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

    <ImageButton
        style="@style/DockedDividerHandle"
        android:id="@+id/docked_divider_handle"
        android:layout_height="48dp"
        android:layout_width="48dp"
        android:background="@null"
        android:src="@drawable/docked_divider_handle"/>

</com.android.systemui.stackdivider.DividerView>
+3 −0
Original line number Diff line number Diff line
@@ -22,4 +22,7 @@
    <!-- Standard notification width + gravity -->
    <dimen name="notification_panel_width">@dimen/standard_notification_panel_width</dimen>
    <integer name="notification_panel_layout_gravity">@integer/standard_notification_panel_layout_gravity</integer>

    <dimen name="docked_divider_handle_width">2dp</dimen>
    <dimen name="docked_divider_handle_height">24dp</dimen>
</resources>
Loading