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

Commit 9eb06333 authored by Ned Burns's avatar Ned Burns
Browse files

Add "Gentle Notifications" header to gentle section

Missing "clear all" support, will add in later CL.

Test: manual

Bug: 131358199
Change-Id: I18aaacb1bf3f173b151bcac8df9dd953d0a7f513
parent 2e6c0043
Loading
Loading
Loading
Loading
+65 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2019 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
  -->

<!-- Extends FrameLayout -->
<com.android.systemui.statusbar.notification.stack.SectionHeaderView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/notification_section_header_height"
    android:focusable="true"
    android:clickable="true"
    >
    <com.android.systemui.statusbar.notification.row.NotificationBackgroundView
        android:id="@+id/backgroundNormal"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    <com.android.systemui.statusbar.notification.row.NotificationBackgroundView
        android:id="@+id/backgroundDimmed"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <LinearLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        >
        <TextView
            android:id="@+id/header_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginLeft="@dimen/notification_section_header_padding_left"
            android:text="@string/notification_section_header_gentle"
            android:textSize="12sp"
            android:textColor="@color/notification_section_header_label_color"
            />
        <ImageView
            android:id="@+id/btn_clear_all"
            android:visibility="gone"
            android:layout_width="@dimen/notification_section_header_height"
            android:layout_height="@dimen/notification_section_header_height"
            android:contentDescription="@string/accessibility_notification_section_header_gentle_clear_all"
            />
    </LinearLayout>

    <com.android.systemui.statusbar.notification.FakeShadowView
        android:id="@+id/fake_shadow"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</com.android.systemui.statusbar.notification.stack.SectionHeaderView>
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@
    <color name="notification_guts_header_text_color">@color/GM2_grey_200</color>
    <color name="notification_guts_button_color">@color/GM2_blue_200</color>

    <color name="notification_section_header_label_color">@color/GM2_grey_200</color>

    <!-- The color of the background in the top part of QSCustomizer -->
    <color name="qs_customize_background">@color/GM2_grey_900</color>

+2 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@
    <color name="notification_alert_color">#FFF87B2B</color>
    <color name="notification_guts_button_color">@color/GM2_blue_700</color>

    <color name="notification_section_header_label_color">@color/GM2_grey_900</color>

    <color name="assist_orb_color">#ffffff</color>

    <color name="keyguard_user_switcher_background_gradient_color">#77000000</color>
+3 −0
Original line number Diff line number Diff line
@@ -692,6 +692,9 @@
    <!-- The top padding of the clear all button -->
    <dimen name="clear_all_padding_top">12dp</dimen>

    <dimen name="notification_section_header_height">40dp</dimen>
    <dimen name="notification_section_header_padding_left">16dp</dimen>

    <!-- Largest size an avatar might need to be drawn in the user picker, status bar, or
         quick settings header -->
    <dimen name="max_avatar_size">48dp</dimen>
+6 −0
Original line number Diff line number Diff line
@@ -1102,6 +1102,12 @@
    <!-- The text for the manage notifications link. [CHAR LIMIT=40] -->
    <string name="manage_notifications_text">Manage</string>

    <!-- Section title for notifications that do not vibrate or make noise. [CHAR LIMIT=40] -->
    <string name="notification_section_header_gentle">Gentle notifications</string>

    <!-- Content description for accessibility: Tapping this button will dismiss all gentle notifications [CHAR LIMIT=NONE] -->
    <string name="accessibility_notification_section_header_gentle_clear_all">Clear all gentle notifications</string>

    <!-- The text to show in the notifications shade when dnd is suppressing notifications. [CHAR LIMIT=100] -->
    <string name="dnd_suppressing_shade_text">Notifications paused by Do Not Disturb</string>

Loading