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

Commit 81fe2d1f authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Refine snap position behavior

- Use the stable insets to communicate the system insets to the
docked divider view.
- When calculating the sizes for the snap positions, exclude the
system insets.
- Add 3 snap position modes: 16:9 in one window, 1:1, 16:9 in the
other (phone portrait). Only 1:1 (phone landscape). Fixed relation,
1:1, 1 - fixed relation (tablet portrait/landscape).

Change-Id: If2166c5fb99f12535eeab5de18e9f5aaf433d77c
parent 52641bc3
Loading
Loading
Loading
Loading
+19 −0
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
  -->
<resources>
    <integer name="config_dockedStackDividerSnapMode">2</integer>
</resources>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -40,5 +40,6 @@
    <!-- Use a larger scaling span for larger screen devices. -->
    <dimen name="config_minScalingSpan">32mm</dimen>

    <integer name="config_dockedStackDividerSnapMode">1</integer>
</resources>
+7 −0
Original line number Diff line number Diff line
@@ -2410,4 +2410,11 @@

    <!-- Default bounds [left top right bottom] on screen for picture-in-picture windows. -->
    <string translatable="false" name="config_defaultPictureInPictureBounds">"0 0 100 100"</string>

    <!-- Controls the snap mode for the docked stack divider
             0 - 3 snap targets: left/top has 16:9 ratio, 1:1, and right/bottom has 16:9 ratio
             1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
             2 - 1 snap target: 1:1
    -->
    <integer name="config_dockedStackDividerSnapMode">0</integer>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -429,4 +429,6 @@

    <item type="dimen" format="integer" name="time_picker_column_start_material">0</item>
    <item type="dimen" format="integer" name="time_picker_column_end_material">1</item>

    <item type="fraction" name="docked_stack_divider_fixed_ratio">34.15%</item>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -1492,6 +1492,8 @@
  <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="integer" name="config_dockedStackDividerSnapMode" />
  <java-symbol type="fraction" name="docked_stack_divider_fixed_ratio" />
  <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" />
Loading