Files
app_Settings/res/layout/notification_history_app_layout.xml
Julia Reynolds abe9246caa Limit the number of concurrent notifs appear on screen
To avoid an ANR in notification history

Test: Manual; with an app with 10k recent notifications
Bug: 183712803
Change-Id: Ia1340accadf43620c7b5a2c94ca1032cfe49ea59
2021-08-11 20:22:53 +00:00

91 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 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="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/app_header"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:clipChildren="true"
android:background="@drawable/button_ripple_radius"
android:paddingTop="20dp"
android:orientation="horizontal"
android:paddingBottom="18dp"
android:paddingStart="16dp">
<ImageView
android:id="@+id/icon"
android:layout_height="24dp"
android:layout_width="24dp"
android:layout_gravity="center_vertical|start"
android:layout_marginEnd="14dp"
android:layout_centerVertical="true"
android:scaleType="centerInside"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/text"
android:layout_toEndOf="@+id/icon"
android:layout_gravity="center_vertical"
android:layout_centerVertical="true"
android:orientation="vertical">
<TextView
android:id="@+id/label"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title"/>
<TextView
android:id="@+id/count"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="start|center_vertical"
android:textDirection="locale"
android:paddingTop="4dp"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification"/>
</LinearLayout>
<include layout="@*android:layout/notification_expand_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"/>
<com.android.settings.notification.history.NotificationHistoryRecyclerView
android:id="@+id/notification_list"
android:layout_width="match_parent"
android:layout_height="500dp"
android:clipChildren="true"
android:clipToPadding="true"
android:clipToOutline="true"
android:importantForAccessibility="yes"
android:scrollbars="none"/>
</LinearLayout>