-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improved error activity ui (#1776)
- Loading branch information
1 parent
d21d6aa
commit ee3e354
Showing
7 changed files
with
263 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,62 @@ | ||
<?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="match_parent" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
tools:context="com.tns.ErrorReportActivity" | ||
android:theme="@style/Widget.AppCompat.Light.ActionBar"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:minHeight="?attr/actionBarSize"/> | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:background="@color/gray" | ||
tools:context="com.tns.ErrorReportActivity" | ||
android:theme="@style/Widget.AppCompat.Light.ActionBar"> | ||
|
||
<androidx.viewpager.widget.ViewPager | ||
android:id="@+id/pager" | ||
android:layout_width="match_parent" | ||
android:layout_height="fill_parent" | ||
android:layout_below="@+id/toolbar" | ||
android:scrollbarAlwaysDrawVerticalTrack="false"> | ||
|
||
</androidx.viewpager.widget.ViewPager> | ||
|
||
<com.google.android.material.tabs.TabLayout | ||
android:id="@+id/tabLayout" | ||
<TextView | ||
android:id="@+id/errorException" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/colorPrimary" | ||
android:minHeight="?attr/actionBarSize" | ||
app:tabIndicatorColor="@color/nativescript_blue" | ||
android:layout_alignParentTop="true" | ||
android:layout_alignParentStart="true" | ||
android:scrollbarStyle="insideOverlay" | ||
android:text="" | ||
android:background="@color/red" | ||
android:textSize="16sp" | ||
android:paddingLeft="16dp" | ||
android:textIsSelectable="true" | ||
android:maxHeight="200dp" | ||
android:scrollbars="vertical" | ||
tools:tabBackground="@android:color/darker_gray" | ||
android:scrollbarAlwaysDrawVerticalTrack="false" | ||
/> | ||
</RelativeLayout> | ||
android:textColor="@color/white" | ||
android:paddingVertical="10dp" | ||
android:paddingRight="16dp" /> | ||
|
||
<RelativeLayout | ||
android:layout_below="@id/errorException" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:minHeight="?attr/actionBarSize" /> | ||
|
||
<androidx.viewpager.widget.ViewPager | ||
android:id="@+id/pager" | ||
android:layout_width="match_parent" | ||
android:layout_height="fill_parent" | ||
android:layout_below="@+id/toolbar" | ||
android:scrollbarAlwaysDrawVerticalTrack="false"> | ||
|
||
</androidx.viewpager.widget.ViewPager> | ||
|
||
<com.google.android.material.tabs.TabLayout | ||
android:id="@+id/tabLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="@color/gray" | ||
android:minHeight="?attr/actionBarSize" | ||
app:tabIndicatorColor="@color/nativescript_blue" | ||
android:layout_alignParentTop="true" | ||
android:layout_alignParentStart="true" | ||
android:scrollbarStyle="insideOverlay" | ||
android:scrollbars="vertical" | ||
tools:tabBackground="@color/gray_color" | ||
android:scrollbarAlwaysDrawVerticalTrack="false" /> | ||
</RelativeLayout> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,71 @@ | ||
<?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="match_parent" | ||
android:orientation="vertical" | ||
android:paddingBottom="10dp" | ||
android:paddingLeft="16dp" | ||
android:paddingRight="16dp" | ||
android:paddingTop="10dp"> | ||
|
||
<Button | ||
android:id="@+id/btnCopyException" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:background="@color/nativescript_blue" | ||
android:paddingLeft="20dp" | ||
android:paddingRight="20dp" | ||
android:text="Copy to clipboard" | ||
android:textAlignment="textStart" | ||
android:textColor="@android:color/white" | ||
tools:layout_width="match_parent"/> | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:background="@color/gray" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
|
||
<LinearLayout | ||
android:id="@+id/linearLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_above="@+id/btnCopyException" | ||
android:layout_above="@+id/bottomButtonRow" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignParentTop="true" | ||
android:orientation="vertical" | ||
android:paddingBottom="10dp" | ||
android:weightSum="100"> | ||
|
||
|
||
<TextView | ||
android:id="@+id/txtErrorMsg" | ||
android:id="@+id/errorStacktrace" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="" | ||
android:textAppearance="?android:attr/textAppearanceSmall" | ||
android:paddingLeft="2dp" | ||
android:paddingRight="2dp" | ||
android:scrollbars="vertical" | ||
android:scrollbarStyle="outsideOverlay" | ||
android:scrollbarAlwaysDrawVerticalTrack="true"/> | ||
android:paddingLeft="16dp" | ||
android:paddingRight="16dp" | ||
android:scrollbarAlwaysDrawVerticalTrack="true" /> | ||
|
||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:id="@+id/bottomButtonRow" | ||
android:layout_width="match_parent" | ||
android:orientation="horizontal" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:paddingBottom="10dp" | ||
android:paddingLeft="16dp" | ||
android:paddingRight="16dp" | ||
android:paddingTop="10dp" | ||
android:layout_height="wrap_content"> | ||
|
||
<Button | ||
android:id="@+id/btnRestartApp" | ||
android:text="Restart APP" | ||
android:textAlignment="center" | ||
android:textColor="@android:color/white" | ||
android:background="@drawable/button_accented" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:layout_marginRight="10dp" /> | ||
|
||
<Button | ||
android:id="@+id/btnCopyException" | ||
android:textColor="@android:color/white" | ||
android:text="Copy" | ||
android:background="@drawable/button" | ||
android:textAlignment="center" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" /> | ||
|
||
|
||
</LinearLayout> | ||
|
||
|
||
</RelativeLayout> | ||
</RelativeLayout> |
Oops, something went wrong.