summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-05-08 23:27:04 +0200
committerGitHub <noreply@github.com>2024-05-08 23:27:04 +0200
commit53ce6cd71a766847dfdf345ecd7b96a6dbca8015 (patch)
tree04a0d8f074b7cacbc088c23b814d6e8deddafeec
parenta61f5487925bd3d08f3c31a440065f958c5ccf71 (diff)
downloadAntennaPod-53ce6cd71a766847dfdf345ecd7b96a6dbca8015.zip
Update error message design (#7167)
-rw-r--r--app/src/main/res/layout/feeditemlist_header.xml79
-rw-r--r--ui/common/src/main/res/drawable/bg_message_error.xml17
2 files changed, 61 insertions, 35 deletions
diff --git a/app/src/main/res/layout/feeditemlist_header.xml b/app/src/main/res/layout/feeditemlist_header.xml
index 9b6d190a8..d28f7dae8 100644
--- a/app/src/main/res/layout/feeditemlist_header.xml
+++ b/app/src/main/res/layout/feeditemlist_header.xml
@@ -140,42 +140,51 @@
</RelativeLayout>
- <TextView
- android:id="@+id/txtvFailure"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="2dp"
- android:background="?attr/icon_red"
- android:gravity="center"
- android:textColor="@color/white"
- android:visibility="gone"
- android:text="@string/refresh_failed_msg"
- tools:visibility="visible"
- tools:text="(!) Last refresh failed" />
-
- <TextView
- android:id="@+id/txtvInformation"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="2dp"
- android:background="?android:attr/colorBackground"
- android:foreground="?android:attr/selectableItemBackground"
- android:visibility="gone"
- android:gravity="center"
- android:textColor="?attr/colorAccent"
- tools:visibility="visible"
- tools:text="(i) Information" />
-
- <TextView
- android:id="@+id/txtvUpdatesDisabled"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="2dp"
- android:background="?android:attr/colorBackground"
- android:visibility="gone"
- android:gravity="center"
- android:textColor="?attr/colorAccent"
- tools:visibility="visible"
- tools:text="Updates disabled" />
+ android:orientation="vertical"
+ android:background="?android:attr/colorBackground">
+
+ <TextView
+ android:id="@+id/txtvFailure"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="?attr/icon_red"
+ android:visibility="gone"
+ android:text="@string/refresh_failed_msg"
+ android:layout_marginHorizontal="16dp"
+ android:layout_marginVertical="8dp"
+ android:paddingHorizontal="16dp"
+ android:paddingVertical="8dp"
+ android:background="@drawable/bg_message_error"
+ android:foreground="?android:attr/selectableItemBackground"
+ tools:visibility="visible"
+ tools:text="(!) Last refresh failed" />
+
+ <TextView
+ android:id="@+id/txtvInformation"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="2dp"
+ android:foreground="?android:attr/selectableItemBackground"
+ android:visibility="gone"
+ android:gravity="center"
+ android:textColor="?attr/colorAccent"
+ tools:visibility="visible"
+ tools:text="(i) Information" />
+
+ <TextView
+ android:id="@+id/txtvUpdatesDisabled"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="2dp"
+ android:visibility="gone"
+ android:gravity="center"
+ android:textColor="?attr/colorAccent"
+ tools:visibility="visible"
+ tools:text="Updates disabled" />
+
+ </LinearLayout>
</LinearLayout>
diff --git a/ui/common/src/main/res/drawable/bg_message_error.xml b/ui/common/src/main/res/drawable/bg_message_error.xml
new file mode 100644
index 000000000..b33afb3a4
--- /dev/null
+++ b/ui/common/src/main/res/drawable/bg_message_error.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <stroke
+ android:width="2dp"
+ android:color="?attr/icon_red" />
+
+ <corners android:radius="8dp" />
+
+ <solid>
+ <aapt:attr name="android:color" >
+ <selector>
+ <item android:alpha="0.1" android:color="?attr/icon_red" />
+ </selector>
+ </aapt:attr>
+ </solid>
+</shape> \ No newline at end of file