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

Commit 078aad71 authored by Anthony Chen's avatar Anthony Chen Committed by Android (Google) Code Review
Browse files

Merge "Allow the width of the notification panel to be adjusted separately...

Merge "Allow the width of the notification panel to be adjusted separately from the quick settings panel."
parents d600fce5 04d1ea75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
  -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/brightness_mirror"
    android:layout_width="@dimen/notification_panel_width"
    android:layout_width="@dimen/qs_panel_width"
    android:layout_height="wrap_content"
    android:layout_gravity="@integer/notification_panel_layout_gravity"
    android:visibility="invisible">
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
        <FrameLayout
            android:id="@+id/qs_frame"
            android:layout="@layout/qs_panel"
            android:layout_width="@dimen/notification_panel_width"
            android:layout_width="@dimen/qs_panel_width"
            android:layout_height="match_parent"
            android:layout_gravity="@integer/notification_panel_layout_gravity"
            android:clipToPadding="false"
+3 −4
Original line number Diff line number Diff line
@@ -69,10 +69,6 @@
    <!-- Height of a small notification in the status bar-->
    <dimen name="notification_min_height">92dp</dimen>

    <!-- Width of each individual notification in the notification panel. MATCH_PARENT in this
         case means the notifications will be measured with its parent's MeasureSpec. -->
    <dimen name="notification_child_width">@dimen/match_parent</dimen>

    <!-- Increased height of a small notification in the status bar -->
    <dimen name="notification_min_height_increased">132dp</dimen>

@@ -209,6 +205,9 @@

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

    <!-- The width of the panel that holds the quick settings. -->
    <dimen name="qs_panel_width">@dimen/notification_panel_width</dimen>

    <dimen name="volume_dialog_panel_width">@dimen/standard_notification_panel_width</dimen>

    <!-- Gravity for the notification panel -->
+2 −2
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.stack.ExpandableViewState;
import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.stack.StackScrollState;

import java.util.ArrayList;
+6 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.app.StatusBarManager;
import android.content.Context;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
@@ -287,16 +288,18 @@ public class NotificationPanelView extends PanelView implements
    }

    public void updateResources() {
        int panelWidth = getResources().getDimensionPixelSize(R.dimen.notification_panel_width);
        Resources res = getResources();
        int qsWidth = res.getDimensionPixelSize(R.dimen.qs_panel_width);
        int panelGravity = getResources().getInteger(R.integer.notification_panel_layout_gravity);
        FrameLayout.LayoutParams lp =
                (FrameLayout.LayoutParams) mQsFrame.getLayoutParams();
        if (lp.width != panelWidth || lp.gravity != panelGravity) {
            lp.width = panelWidth;
        if (lp.width != qsWidth || lp.gravity != panelGravity) {
            lp.width = qsWidth;
            lp.gravity = panelGravity;
            mQsFrame.setLayoutParams(lp);
        }

        int panelWidth = res.getDimensionPixelSize(R.dimen.notification_panel_width);
        lp = (FrameLayout.LayoutParams) mNotificationStackScroller.getLayoutParams();
        if (lp.width != panelWidth || lp.gravity != panelGravity) {
            lp.width = panelWidth;
Loading