Files
packages_apps_Settings/res/layout/notification_history.xml
Julia Reynolds b37d565ce8 Add screen for notification history
Bug: 137396965
Test: manual

(cherry picked from commit 84b593d592a74aeddfce453bc8700180192199ed)

Change-Id: Icac4000bd7323583f8a5f462ccb40826a4151765
2020-01-21 10:06:47 -05:00

161 lines
7.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="wrap_content"
android:padding="16dp"
android:background="@*android:color/material_grey_50">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- TODO: header switch -->
<LinearLayout
android:id="@+id/snoozed_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="10dp">
<LinearLayout
android:id="@+id/snooze_header"
android:layout_height="48dp"
android:layout_width="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:src="@drawable/ic_snooze"
android:tint="?android:attr/textColorPrimary"
android:padding="6dp"
android:layout_height="36dp"
android:layout_width="36dp" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/notification_history_snooze"
android:textColor="?android:attr/textColorPrimary"
android:paddingStart="@dimen/notification_history_header_drawable_start" />
</LinearLayout>
<FrameLayout
android:id="@+id/list_container"
android:layout_width="wrap_content"
android:layout_height="300dp"
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="match_parent"
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"/>
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/recently_dismissed_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="10dp">
<LinearLayout
android:id="@+id/dismissed_header"
android:layout_height="48dp"
android:layout_width="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:src="@drawable/ic_clear"
android:tint="?android:attr/textColorPrimary"
android:padding="6dp"
android:layout_height="36dp"
android:layout_width="36dp" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/notification_history_dismiss"
android:textColor="?android:attr/textColorPrimary"
android:paddingStart="@dimen/notification_history_header_drawable_start" />
</LinearLayout>
<FrameLayout
android:id="@+id/list_container"
android:layout_width="wrap_content"
android:layout_height="300dp"
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="match_parent"
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"/>
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/today_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/app_header"
android:layout_height="48dp"
android:layout_width="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:src="@drawable/ic_today"
android:tint="?android:attr/textColorPrimary"
android:padding="6dp"
android:layout_height="36dp"
android:layout_width="36dp" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/notification_history_today"
android:textColor="?android:attr/textColorPrimary"
android:paddingStart="@dimen/notification_history_header_drawable_start" />
</LinearLayout>
<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>
</ScrollView>