Files
app_Settings/res/layout/notification_history.xml
Julia Reynolds 2eb9ef4d6f Notification history improvements
- don't keep readding history list onresume
- remove unstyled background (just use elevation for contrast for now)
- remove summaries from snoozed and recently dimissed because the user
wouldn't have seen their content

Test: manual
Fixes: 149499024
Change-Id: Ie43c752f42a7dfcac5ca9e3d118df07124daf974
2020-02-14 21:33:56 +00:00

178 lines
8.2 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.
-->
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/styled_switch_bar"/>
<LinearLayout
android:id="@+id/history_off"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="164dp"
android:orientation="vertical">
<ImageView
android:id="@+id/history_image"
android:layout_width="67dp"
android:layout_height="67dp"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/notification_history"
android:scaleType="fitCenter"
android:tint="?android:attr/colorControlNormal"
android:src="@drawable/ic_history" />
<TextView
android:id="@+id/history_off_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/history_image"
android:layout_marginTop="48dp"
android:layout_marginStart="48dp"
android:layout_marginEnd="48dp"
android:layout_gravity="center_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/notification_history_off_title_extended" />
<TextView
android:id="@+id/history_off_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/history_off_title"
android:layout_marginStart="48dp"
android:layout_marginEnd="48dp"
android:layout_marginTop="16dp"
android:layout_gravity="center_horizontal"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/notification_history_summary" />
</LinearLayout>
<LinearLayout
android:id="@+id/history_on"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:id="@+id/snoozed_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="28dp">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/notification_history_snooze"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingBottom="16dp" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/list_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="true"
android:elevation="3dp"
android:background="@drawable/rounded_bg">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/notification_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="true"
settings:fastScrollEnabled="true"
settings:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
settings:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
settings:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
settings:fastScrollVerticalTrackDrawable="@drawable/line_drawable"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/recently_dismissed_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="28dp">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/notification_history_dismiss"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingBottom="16dp" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/list_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="3dp"
android:clipChildren="true"
android:background="@drawable/rounded_bg">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/notification_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="true"
settings:fastScrollEnabled="true"
settings:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
settings:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
settings:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
settings:fastScrollVerticalTrackDrawable="@drawable/line_drawable"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/today_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/notification_history_today"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingBottom="16dp" />
<LinearLayout
android:id="@+id/apps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="3dp"
android:orientation="vertical"
android:background="@drawable/rounded_bg">
<!-- app based recycler views added here -->
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>