forked from sk22/megalodon
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ErrorDisplayItem): improve UI/UX with new design
Updates the design of the ErrorStatusDisplayItem to be more user-friendly. The new design displays an error message indicating that an error has occurred while attempting to display the item. It then offers the choice of either view the item in the browser or copy the error details.
- Loading branch information
1 parent
b38c78c
commit 14e6187
Showing
4 changed files
with
111 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginVertical="8dp" | ||
android:layout_marginHorizontal="16dp" | ||
android:padding="16dp" | ||
android:clipToPadding="false" | ||
android:background="@drawable/bg_settings_banner"> | ||
|
||
<ImageView | ||
android:id="@+id/icon" | ||
android:layout_width="40dp" | ||
android:layout_height="40dp" | ||
android:layout_marginEnd="16dp" | ||
android:scaleType="center" | ||
android:importantForAccessibility="no" | ||
android:tint="?colorM3OnPrimaryContainer" | ||
android:background="@drawable/white_circle" | ||
android:backgroundTint="?colorM3PrimaryContainer" | ||
android:src="@drawable/ic_fluent_warning_24_regular" /> | ||
|
||
<TextView | ||
android:id="@+id/title" | ||
android:layout_width="match_parent" | ||
android:layout_height="24dp" | ||
android:layout_toEndOf="@id/icon" | ||
android:layout_marginBottom="2dp" | ||
android:textAppearance="@style/m3_title_medium" | ||
android:textColor="?colorM3OnSurface" | ||
android:singleLine="true" | ||
android:gravity="center_vertical" | ||
android:text="@string/mo_error_display_title"/> | ||
|
||
<TextView | ||
android:id="@+id/text" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_toEndOf="@id/icon" | ||
android:layout_below="@id/title" | ||
android:textAppearance="@style/m3_body_medium" | ||
android:minHeight="20dp" | ||
android:gravity="center_vertical" | ||
android:textColor="?colorM3OnSurface" | ||
android:text="@string/mo_error_display_text"/> | ||
|
||
<Button | ||
android:id="@+id/button_open_browser" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/text" | ||
android:layout_toEndOf="@id/icon" | ||
android:layout_marginStart="-16dp" | ||
android:layout_marginBottom="-10dp" | ||
style="@style/Widget.Mastodon.M3.Button.Text" | ||
android:paddingStart="16dp" | ||
android:paddingEnd="16dp" | ||
android:minWidth="0dp" | ||
android:text="@string/open_in_browser" | ||
tools:text="@string/resume_notifications_now"/> | ||
|
||
<Button | ||
android:id="@+id/button_copy_error_details" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/text" | ||
android:layout_toEndOf="@id/button_open_browser" | ||
android:layout_marginBottom="-10dp" | ||
style="@style/Widget.Mastodon.M3.Button.Text" | ||
android:paddingStart="16dp" | ||
android:paddingEnd="16dp" | ||
android:minWidth="0dp" | ||
android:text="@string/mo_error_display_copy_error_details"/> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters