Add the app notifications filter
This commit is contained in:
123
app/src/main/res/layout/activity_app_notifications_filter.xml
Normal file
123
app/src/main/res/layout/activity_app_notifications_filter.xml
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<data>
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.tommasoberlose.anotherwidget.ui.viewmodels.AppNotificationsViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
tools:context="com.tommasoberlose.anotherwidget.ui.activities.AppNotificationsFilterActivity">
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="0dp"
|
||||
android:id="@+id/toolbar"
|
||||
app:cardBackgroundColor="@color/colorPrimary">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:id="@+id/action_back"
|
||||
app:tint="@color/colorPrimaryText"
|
||||
android:src="@drawable/round_arrow_back" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/applications_filter_title"
|
||||
android:gravity="center"
|
||||
style="@style/AnotherWidget.Main.Title"/>
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/round_clear_all"
|
||||
app:tint="@color/colorPrimaryText"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/clear_selection" />
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="0dp"
|
||||
app:cardBackgroundColor="@color/colorPrimary">
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/colorPrimaryDark"
|
||||
app:cardCornerRadius="9dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="64dp"
|
||||
android:inputType="textCapWords"
|
||||
android:textColor="@color/colorPrimaryText"
|
||||
android:textColorHint="@color/colorSecondaryText"
|
||||
android:textAlignment="viewStart"
|
||||
android:id="@+id/search"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center_vertical|start"
|
||||
android:hint="@string/search"
|
||||
android:text="@={viewModel.searchInput}"
|
||||
android:autofillHints="" />
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/round_close"
|
||||
app:tint="@color/colorPrimaryText"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:id="@+id/clear_search" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateTint="@color/colorAccent"
|
||||
android:layout_marginTop="-7dp"
|
||||
android:id="@+id/loader"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal" />
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/list_view" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
@ -49,6 +49,9 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/round_clear_all"
|
||||
app:tint="@color/colorPrimaryText"
|
||||
android:layout_alignParentRight="true"
|
||||
|
@ -197,12 +197,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
style="@style/AnotherWidget.Settings.Title"
|
||||
android:text="App notifications filter"/>
|
||||
android:text="@string/applications_filter_title"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/settings_music_players_filter_subtitle"
|
||||
android:text="@string/applications_filter_subtitle"
|
||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -209,6 +209,8 @@
|
||||
<string name="google_fit">Google Fit</string>
|
||||
<string name="action_connect">Collega</string>
|
||||
<string name="action_disconnect">Scollega</string>
|
||||
<string name="applications_filter_title">Applicazioni</string>
|
||||
<string name="applications_filter_subtitle">Scegli le notifiche che vuoi vedere</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="action_share">Condividi</string>
|
||||
|
@ -226,6 +226,8 @@
|
||||
<string name="google_fit">Google Fit</string>
|
||||
<string name="action_connect">Connect</string>
|
||||
<string name="action_disconnect">Disconnect</string>
|
||||
<string name="applications_filter_title">Applications</string>
|
||||
<string name="applications_filter_subtitle">Choose which notifications to view</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="action_share">Share</string>
|
||||
|
Reference in New Issue
Block a user