summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/home_section_notification.xml
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2023-04-07 16:37:32 +0200
committerGitHub <noreply@github.com>2023-04-07 16:37:32 +0200
commit39d309e906c0b0b3a199064505ce76bc8045abd9 (patch)
tree8ee1fa6b08780f06688a148fc9c2cdbab57c948f /app/src/main/res/layout/home_section_notification.xml
parentda9bb8d578c44d16aa191e4bf6f1d150f639b634 (diff)
downloadAntennaPod-39d309e906c0b0b3a199064505ce76bc8045abd9.zip
Add banner on home screen if notification permission is not granted (#6412)
Diffstat (limited to 'app/src/main/res/layout/home_section_notification.xml')
-rw-r--r--app/src/main/res/layout/home_section_notification.xml49
1 files changed, 49 insertions, 0 deletions
diff --git a/app/src/main/res/layout/home_section_notification.xml b/app/src/main/res/layout/home_section_notification.xml
new file mode 100644
index 000000000..7e2182176
--- /dev/null
+++ b/app/src/main/res/layout/home_section_notification.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clipToPadding="false"
+ android:padding="16dp">
+
+ <com.google.android.material.card.MaterialCardView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="vertical"
+ app:cardCornerRadius="12dp"
+ app:cardElevation="0dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="16dp"
+ android:text="@string/notification_permission_text" />
+
+ <Button
+ android:id="@+id/allowButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:text="@android:string/ok" />
+
+ <Button
+ android:id="@+id/openSettingsButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:visibility="gone"
+ android:text="@string/open_settings" />
+
+ </LinearLayout>
+
+ </com.google.android.material.card.MaterialCardView>
+
+</LinearLayout>