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

Commit f4727780 authored by Geoffrey Pitsch's avatar Geoffrey Pitsch Committed by Android (Google) Code Review
Browse files

Merge "Change Notification Inline Settings for Channels"

parents bf9928de 4dd5006f
Loading
Loading
Loading
Loading
+82 −123
Original line number Diff line number Diff line
@@ -30,130 +30,89 @@
    android:theme="@*android:style/Theme.DeviceDefault.Light">

    <!-- header -->
    <LinearLayout
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
            android:paddingTop="15dp"
        android:paddingTop="20dp"
        android:paddingEnd="8dp"
            android:id="@+id/notification_guts_header"
            android:orientation="horizontal"
            android:layout_gravity="start">

        <ImageView
                android:id="@+id/app_icon"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:layout_marginEnd="6dp"
                android:src="@android:drawable/arrow_down_float" />
        android:paddingBottom="15dp"
        android:id="@+id/notification_guts_header">
        <TextView
            android:id="@+id/pkgname"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
                style="@style/TextAppearance.NotificationGuts.Header" />
            android:layout_alignParentStart="true"
            style="@style/TextAppearance.NotificationGuts.Secondary" />
        <TextView
            android:id="@+id/channel_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
                android:id="@+id/debug_info"
                android:layout_weight="0"
                style="@style/TextAppearance.NotificationGuts.Header"
                android:layout_gravity="bottom|start"
                android:visibility="gone" />
    </LinearLayout>
            android:layout_alignParentStart="true"
            android:layout_below="@id/pkgname"
            style="@style/TextAppearance.NotificationGuts.Header" />
        <Switch
            android:id="@+id/channel_enabled_switch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:background="@null" />
    </RelativeLayout>
    <!-- Importance radio buttons -->
    <LinearLayout
        android:id="@+id/importance"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <RadioGroup
            android:id="@+id/importance_buttons"
            android:layout_width="match_parent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingStart="3dp"
            android:paddingTop="4dp"
            android:paddingEnd="8dp" >
            android:paddingEnd="@*android:dimen/notification_content_margin_end">
            <RadioButton
                android:id="@+id/high_importance"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/notification_inline_importance_height"
                style="@style/TextAppearance.NotificationGuts.Radio"
                android:buttonTint="@color/notification_guts_buttons" />
            <RadioButton
                android:id="@+id/silent_importance"
                android:id="@+id/default_importance"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:paddingStart="22dp"
                android:text="@string/show_silently"
                android:layout_height="@dimen/notification_inline_importance_height"
                style="@style/TextAppearance.NotificationGuts.Radio"
                android:buttonTint="@color/notification_guts_buttons" />
            <RadioButton
                android:id="@+id/block_importance"
                android:id="@+id/low_importance"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:paddingStart="22dp"
                android:text="@string/block"
                android:layout_height="@dimen/notification_inline_importance_height"
                style="@style/TextAppearance.NotificationGuts.Radio"
                android:buttonTint="@color/notification_guts_buttons" />
            <RadioButton
                android:id="@+id/reset_importance"
                android:id="@+id/min_importance"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:paddingStart="22dp"
                android:layout_height="@dimen/notification_inline_importance_height"
                style="@style/TextAppearance.NotificationGuts.Radio"
                android:buttonTint="@color/notification_guts_buttons" />
        </RadioGroup>
    <!-- Importance slider -->
        <LinearLayout
            android:id="@+id/importance_slider"
            android:id="@+id/importance_buttons_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="vertical"
            android:clickable="false"
            android:focusable="false"
            android:paddingEnd="8dp"
            android:paddingTop="4dp"
            android:visibility="gone">
        <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                style="@style/TextAppearance.NotificationGuts.Primary"
                android:ellipsize="marquee"
                android:fadingEdge="horizontal"
                android:paddingBottom="2dp"/>

            android:orientation="vertical">
            <include layout="@layout/notification_guts_importance_text"/>
            <include layout="@layout/notification_guts_importance_text"/>
            <include layout="@layout/notification_guts_importance_text"/>
            <include layout="@layout/notification_guts_importance_text"/>
        </LinearLayout>
    </LinearLayout>
    <!-- Channel Disabled Text -->
    <TextView
                android:id="@+id/summary"
        android:id="@+id/channel_disabled"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
                android:layout_alignStart="@android:id/title"
                android:textAlignment="viewStart"
                style="@style/TextAppearance.NotificationGuts.Secondary"
                android:maxLines="3"
                android:minLines="2"
                android:paddingBottom="4dp" />

        <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="8dp" >

            <ImageView
                    android:id="@+id/auto_importance"
                    android:src="@drawable/notification_auto_importance"
                    android:layout_gravity="center_vertical|start"
                    android:layout_width="48dp"
                    android:layout_height="48dp" />

            <SeekBar
                    android:id="@+id/seekbar"
                    android:layout_marginStart="56dp"
                    android:layout_marginEnd="32dp"
                    android:layout_gravity="center_vertical"
                    android:layout_width="match_parent"
                    android:layout_height="48dp"
                    android:focusable="true"
                    android:background="#00ffffff"
                    android:progressBackgroundTint="@color/notification_guts_secondary_slider_color"
                    android:thumbTint="?android:attr/colorAccent"
                    android:progressTint="?android:attr/colorAccent"
                    style="@android:style/Widget.Material.SeekBar.Discrete"
                    android:tickMarkTint="@android:color/black" />

        </FrameLayout>
    </LinearLayout>
    <!-- buttons -->
        android:text="@string/notification_channel_disabled"
        style="@style/TextAppearance.NotificationGuts.Secondary" />
    <!-- Settings and Done buttons -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright 2016, 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/notification_inline_importance_height"
    android:paddingTop="4dp"
    android:orientation="vertical">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:textAlignment="viewStart"
        android:singleLine="true"
        android:text="@string/high_importance"
        android:textAppearance="@style/TextAppearance.NotificationGuts.Primary" />
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:textAlignment="viewStart"
        android:singleLine="true"
        android:text="@string/notification_importance_high"
        android:textAppearance="@style/TextAppearance.NotificationGuts.Secondary" />
</LinearLayout>
+3 −0
Original line number Diff line number Diff line
@@ -302,6 +302,9 @@
    <!-- The height of the divider between the individual notifications when the notification wants it to be increased. This is currently the case for notification groups -->
    <dimen name="notification_divider_height_increased">6dp</dimen>

    <!-- The height of an importance selection in the inline notification controls -->
    <dimen name="notification_inline_importance_height">55dp</dimen>

    <!-- The minimum amount of top overscroll to go to the quick settings. -->
    <dimen name="min_top_overscroll_to_qs">36dp</dimen>

+20 −23
Original line number Diff line number Diff line
@@ -1334,41 +1334,38 @@
        \n- Block all notifications from the app
    </string>

    <!-- Notification importance title, user unspecified status-->
    <string name="user_unspecified_importance">Importance: Automatic</string>
    <!-- Notification importance title, blocked status-->
    <string name="blocked_importance">Importance: Level 0</string>
    <!-- Notification Inline Controls: Header for apps that are not yet using notification channels. -->
    <string name="notification_header_default_channel">Notifications</string>

    <!-- Notification Inline Controls: Shown when a channel's notifications are currently blocked -->
    <string name="notification_channel_disabled">You won\'t get these notifications anymore.</string>

    <!-- Notification Inline Controls: Header text for describing from which app this notification
        originates.  The line below this in the layout will display the channel name.
        Note for localization:  For languages in which the two separate lines cannot be a continuous
        sentence, translate this as a separate statement: "[Calendar] notifications" -->
    <string name="notification_importance_header_app"><xliff:g id="app" example="Calendar">%s</xliff:g> notifications for</string>

    <!-- Notification importance title, min status-->
    <string name="min_importance">Importance: Level 1</string>
    <string name="min_importance">Low</string>
    <!-- Notification importance title, low status-->
    <string name="low_importance">Importance: Level 2</string>
    <string name="low_importance">Medium</string>
    <!-- Notification importance title, normal status-->
    <string name="default_importance">Importance: Level 3</string>
    <string name="default_importance">High</string>
    <!-- Notification importance title, high status-->
    <string name="high_importance">Importance: Level 4</string>
    <!-- Notification importance title, max status-->
    <string name="max_importance">Importance: Level 5</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: blocked importance level description -->
    <string name="notification_importance_user_unspecified">App determines importance for each notification.</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: blocked importance level description -->
    <string name="notification_importance_blocked">Never show notifications from this app.</string>
    <string name="high_importance">Urgent</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: min importance level description -->
    <string name="notification_importance_min">No full screen interruption, peeking, sound, or vibration. Hide from lock screen and status bar.</string>
    <string name="notification_importance_min">No sound or visual interruption</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: low importance level description -->
    <string name="notification_importance_low">No full screen interruption, peeking, sound, or vibration.</string>
    <string name="notification_importance_low">Show silently</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: normal importance level description -->
    <string name="notification_importance_default">No full screen interruption or peeking.</string>
    <string name="notification_importance_default">Make sound</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: high importance level description -->
    <string name="notification_importance_high">Always peek. No full screen interruption.</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: max importance level description -->
    <string name="notification_importance_max">Always peek, and allow full screen interruption.</string>
    <string name="notification_importance_high">Make sound and pop on screen</string>

    <!-- Notification: Control panel: Label for button that launches notification settings. [CHAR LIMIT=NONE] -->
    <string name="notification_more_settings">More settings</string>
+7 −5
Original line number Diff line number Diff line
@@ -359,12 +359,14 @@
    </style>

    <style name="TextAppearance.NotificationGuts.Header">
        <item name="android:alpha">.38</item>
        <item name="android:textSize">12sp</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textSize">20sp</item>
    </style>

    <style name="TextAppearance.NotificationGuts.Secondary">
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:alpha">.38</item>
        <item name="android:textSize">12sp</item>
    </style>

    <style name="TextAppearance.NotificationGuts.Primary">
Loading