feat: crash report | various small fixes
This commit is contained in:
parent
31c509f88c
commit
8a0224e6b0
12 changed files with 250 additions and 88 deletions
75
app/src/main/res/layout/activity_crash.xml
Normal file
75
app/src/main/res/layout/activity_crash.xml
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="top|center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="48dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/copyButton"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_thin"
|
||||
android:text="@string/sad"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="64sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/app_died"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="32sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins"
|
||||
android:text="@string/an_unexpected_error_occurred"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?attr/colorOnBackground" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/crashReportView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:fontFamily="@font/poppins"
|
||||
android:inputType="textMultiLine|none"
|
||||
android:textIsSelectable="true"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:padding="16dp"
|
||||
android:textColor="?attr/colorOnBackground" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/copyButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="64dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_margin="64dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:maxLines="1"
|
||||
android:text="@string/copy_report"
|
||||
app:cornerRadius="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -44,11 +44,7 @@
|
|||
android:fontFamily="@font/poppins_thin"
|
||||
android:text="@string/sad"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="64sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:textSize="64sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_internet"
|
||||
|
@ -56,10 +52,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_internet"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/noInternetSad" />
|
||||
android:textColor="?attr/colorOnBackground"/>
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
|
@ -69,6 +62,7 @@
|
|||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_margin="128dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:maxLines="1"
|
||||
android:text="@string/refresh"
|
||||
app:cornerRadius="16dp"
|
||||
app:icon="@drawable/ic_round_refresh_24" />
|
||||
|
|
|
@ -967,4 +967,7 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
|||
<string name="your_story">Your Story</string>
|
||||
<string name="your_progress">Your Progress</string>
|
||||
<string name="logout_confirm">Are you sure you want to logout?</string>
|
||||
<string name="app_died">APP DIED</string>
|
||||
<string name="an_unexpected_error_occurred">An unexpected error occurred.\nPlease send a crash report to the developer :)</string>
|
||||
<string name="copy_report">Copy Report</string>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue