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

Commit 09a9dc07 authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

Fixing navbar and notification shade overlap

Moving notifications scrim bottom edge a bit higher - according to the specs. That involved some collateral changes as bottom margin was never updated in NotificationsQuickSettingsContainer.
Also renaming resources:
notification_panel_margin_bottom -> notification_panel_padding_bottom
close_handle_underlap -> notification_panel_margin_bottom
which I think reflects a bit better what they're doing.

Fixes: 213304101
Test: manual + NotificationQSContainerControllerTest
Change-Id: I7102e01b98fc9f1298bd20c9d722706e85829d87
parent 826e30b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@
            android:layout_marginTop="@dimen/notification_panel_margin_top"
            android:layout_width="@dimen/notification_panel_width"
            android:layout_height="match_parent"
            android:layout_marginBottom="@dimen/close_handle_underlap"
            android:layout_marginBottom="@dimen/notification_panel_margin_bottom"
            android:importantForAccessibility="no"
            systemui:layout_constraintStart_toStartOf="parent"
            systemui:layout_constraintEnd_toEndOf="parent"
+4 −0
Original line number Diff line number Diff line
@@ -26,6 +26,10 @@
         keyguard_split_shade_top_margin - status_bar_header_height_keyguard = 8dp -->
    <dimen name="keyguard_clock_top_margin">8dp</dimen>

    <dimen name="split_shade_notifications_scrim_margin_bottom">16dp</dimen>

    <dimen name="notification_panel_margin_bottom">48dp</dimen>

    <!-- Limit the TaskView to this percentage of the overall screen width (0.0 - 1.0) -->
    <item name="controls_task_view_width_percentage" translatable="false" format="float" type="dimen">0.45</item>
    <dimen name="controls_task_view_right_margin">8dp</dimen>
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (c) 2022, 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>
    <dimen name="split_shade_notifications_scrim_margin_bottom">16dp</dimen>
    <dimen name="notification_panel_margin_bottom">56dp</dimen>
</resources>
+6 −5
Original line number Diff line number Diff line
@@ -311,9 +311,6 @@
    <!-- Move the back button drawable for 3 button layout upwards in ime mode and in portrait -->
    <dimen name="navbar_back_button_ime_offset">2dp</dimen>

    <!-- Amount of close_handle that will NOT overlap the notification list -->
    <dimen name="close_handle_underlap">32dp</dimen>

    <!-- Height of the status bar header bar in the car setting. -->
    <dimen name="car_status_bar_header_height">128dp</dimen>

@@ -376,8 +373,12 @@
    -->
    <dimen name="nssl_split_shade_min_content_height">256dp</dimen>

    <!-- The bottom margin of the panel that holds the list of notifications. -->
    <dimen name="notification_panel_margin_bottom">0dp</dimen>
    <dimen name="notification_panel_margin_bottom">32dp</dimen>

    <!-- The bottom padding of the panel that holds the list of notifications. -->
    <dimen name="notification_panel_padding_bottom">0dp</dimen>

    <dimen name="split_shade_notifications_scrim_margin_bottom">0dp</dimen>

    <dimen name="notification_panel_width">@dimen/match_parent</dimen>

+3 −3
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    private int mMaxTopPadding;
    private int mTopPadding;
    private boolean mAnimateNextTopPaddingChange;
    private int mBottomMargin;
    private int mBottomPadding;
    private int mBottomInset = 0;
    private float mQsExpansionFraction;
    private final int mSplitShadeMinContentHeight;
@@ -981,7 +981,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        mMinTopOverScrollToEscape = res.getDimensionPixelSize(
                R.dimen.min_top_overscroll_to_qs);
        mStatusBarHeight = SystemBarUtils.getStatusBarHeight(mContext);
        mBottomMargin = res.getDimensionPixelSize(R.dimen.notification_panel_margin_bottom);
        mBottomPadding = res.getDimensionPixelSize(R.dimen.notification_panel_padding_bottom);
        mMinimumPaddings = res.getDimensionPixelSize(R.dimen.notification_side_paddings);
        mQsTilePadding = res.getDimensionPixelOffset(R.dimen.qs_tile_margin_horizontal);
        mSkinnyNotifsInLandscape = res.getBoolean(R.bool.config_skinnyNotifsInLandscape);
@@ -2280,7 +2280,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable

        // The topPadding can be bigger than the regular padding when qs is expanded, in that
        // state the maxPanelHeight and the contentHeight should be bigger
        mContentHeight = height + Math.max(mIntrinsicPadding, mTopPadding) + mBottomMargin;
        mContentHeight = height + Math.max(mIntrinsicPadding, mTopPadding) + mBottomPadding;
        updateScrollability();
        clampScrollPosition();
        updateStackPosition();
Loading