Skip to content

Commit e020111

Browse files
committed
feat: Add icons to error screen buttons
1 parent 73f3b31 commit e020111

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24"
6+
android:tint="?attr/colorOnPrimary">
7+
<path
8+
android:fillColor="@android:color/white"
9+
android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
10+
</vector>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24"
6+
android:tint="?attr/colorControlNormal">
7+
<path
8+
android:fillColor="@android:color/white"
9+
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92s2.92,-1.31 2.92,-2.92c0,-1.61 -1.31,-2.92 -2.92,-2.92zM18,4c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM6,13c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM18,20.02c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1z"/>
10+
</vector>

what-the-stack/src/main/res/layout/activity_what_the_stack.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
45
android:id="@+id/nestedScrollRoot"
56
android:layout_width="match_parent"
67
android:layout_height="match_parent"
@@ -70,27 +71,31 @@
7071

7172
<com.google.android.material.button.MaterialButton
7273
android:id="@+id/copyStacktrace"
73-
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
74+
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
7475
android:layout_width="match_parent"
7576
android:layout_height="wrap_content"
7677
android:layout_marginStart="16dp"
7778
android:layout_marginTop="16dp"
7879
android:layout_marginEnd="16dp"
79-
android:layout_marginBottom="8dp"
80+
android:layout_marginBottom="2dp"
8081
android:text="@string/copy_stacktrace"
81-
android:textColor="?attr/colorOnSurface"/>
82+
android:textColor="?attr/colorOnSurface"
83+
app:icon="@drawable/ic_outline_content_copy_24"
84+
app:iconTint="?attr/colorSecondary" />
8285

8386
<com.google.android.material.button.MaterialButton
8487
android:id="@+id/shareStacktrace"
85-
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
88+
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
8689
android:layout_width="match_parent"
8790
android:layout_height="wrap_content"
8891
android:layout_marginStart="16dp"
89-
android:layout_marginTop="8dp"
92+
android:layout_marginTop="2dp"
9093
android:layout_marginEnd="16dp"
9194
android:layout_marginBottom="8dp"
9295
android:text="@string/share_stacktrace"
93-
android:textColor="?attr/colorOnSurface"/>
96+
android:textColor="?attr/colorOnSurface"
97+
app:icon="@drawable/ic_outline_share_24"
98+
app:iconTint="?attr/colorSecondary"/>
9499

95100
<TextView
96101
android:id="@+id/stacktraceHeader"

0 commit comments

Comments
 (0)