mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-06 03:05:17 +08:00
Added function AppErrorsRecordActivity and support native crash message
This commit is contained in:
10
app/src/main/res/drawable-night/bg_permotion_ripple.xml
Normal file
10
app/src/main/res/drawable-night/bg_permotion_ripple.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#777777">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#666E6E6E" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
10
app/src/main/res/drawable/bg_permotion_ripple.xml
Normal file
10
app/src/main/res/drawable/bg_permotion_ripple.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#777777">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#66E4E4E4" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
6
app/src/main/res/drawable/bg_red_round.xml
Normal file
6
app/src/main/res/drawable/bg_red_round.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#EF5350" />
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
9
app/src/main/res/drawable/ic_clear.xml
Normal file
9
app/src/main/res/drawable/ic_clear.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="150dp"
|
||||
android:height="150dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M785.8,927.4h-64.9c-9.7,0 -16.9,-9.7 -14.3,-19.5 0,-0.6 0,-0.6 0.6,-1.3 4.5,-16.9 -18.1,-26.6 -27.2,-11.7 -7.2,11 -13,20.2 -16.9,26a14.8,14.8 0,0 1,-12.3 6.5h-56.5c-9.7,0 -16.9,-9.7 -14.3,-19.5 0,-0.6 0,-0.6 0.6,-1.3 4.5,-16.9 -18.2,-26.6 -27.3,-11.7 -7.1,11 -13,20.2 -16.9,26a14.8,14.8 0,0 1,-12.3 6.5h-55.8c-9.7,0 -16.9,-9.7 -14.3,-19.5 0,-0.6 0,-0.6 0.6,-1.3 4.5,-16.9 -18.2,-26.6 -27.3,-11.7 -7.1,11 -13,20.2 -16.9,26a14.8,14.8 0,0 1,-12.3 6.5H360c-9.7,0 -16.9,-9.7 -14.3,-19.5 0,-0.6 0,-0.6 0.6,-1.3 4.5,-16.9 -18.2,-26.6 -27.3,-11.7 -7.1,11 -13,20.2 -16.9,26a14.8,14.8 0,0 1,-12.4 6.5H207.5a13.1,13.1 0,0 1,-7.1 -1.9c-43.5,-25.3 -62.9,-84.4 0.6,-138.9 42.2,-36.4 46.7,-94.8 45.4,-147.3 0,-8.4 6.5,-15.6 14.9,-15.6h526.4c7.1,0 13,4.5 14.3,11.7 14.9,64.9 20.1,116.2 32.4,205.8 8.4,65.5 -48.7,86.3 -48.7,86.3zM215.3,570.4c-20.1,0 -29.2,-14.9 -20.8,-32.5l70.8,-150.6c8.4,-18.2 31.8,-32.5 51.3,-32.5h113.6a14.7,14.7 0,0 0,14.9 -14.9V147.8c0.6,-28.6 23.4,-51.3 51.3,-51.3h42.2c27.9,0 51.3,22.7 51.3,51.3v190.8c0,8.4 6.5,14.9 14.9,14.9h109.7c20.1,0 42.8,14.9 51.3,32.4l70.7,150.6c8.5,18.2 -0.6,32.4 -20.7,32.4l-600.4,1.3z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
11
app/src/main/res/drawable/ic_debug.xml
Normal file
11
app/src/main/res/drawable/ic_debug.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="250dp"
|
||||
android:height="250dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024"
|
||||
tools:ignore="VectorRaster">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M510.9,1024c123.9,0 231.8,-67.1 289.8,-168.2h194.3v-111.4L841.6,744.4c2.3,-18.2 4.5,-36.4 4.5,-55.7v-55.7h148.9v-111.4h-147.7L847.3,466c0,-19.3 -2.3,-37.5 -4.5,-55.7h154.6v-111.4L801.8,298.9c-25,-43.2 -60.2,-80.7 -102.3,-109.1l113.7,-109.1L734.8,0 590.4,138.7c-26.1,-5.7 -52.3,-9.1 -79.6,-9.1 -27.3,0 -53.4,3.4 -78.4,9.1L291.5,0l-78.4,78.4 110.2,109.1c-40.9,28.4 -76.1,65.9 -101.1,109.1L26.7,296.6L26.7,409.1h154.6c-2.3,18.2 -4.5,37.5 -4.5,55.7v55.7L26.7,520.5v111.4h148.9v55.7c0,19.3 2.3,37.5 4.5,55.7L26.7,743.3v111.4h194.3c58,101.1 165.9,169.3 289.8,169.3zM399.5,409.1h223.9v111.4L399.5,520.5L399.5,409.1zM399.5,631.9h223.9v111.4L399.5,743.3v-111.4z" />
|
||||
</vector>
|
93
app/src/main/res/layout/activity_app_errors_record.xml
Normal file
93
app/src/main/res/layout/activity_app_errors_record.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:background="@color/colorThemeBackground"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.AppErrorsRecordActivity"
|
||||
tools:ignore="ContentDescription,UseCompoundDrawables">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="0dp"
|
||||
android:gravity="center|start"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingRight="15dp"
|
||||
android:paddingBottom="15dp">
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
android:id="@+id/title_back_icon"
|
||||
style="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:src="@mipmap/ic_back"
|
||||
android:tint="@color/colorTextGray"
|
||||
android:tooltipText="@string/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="2.5dp"
|
||||
android:layout_weight="1"
|
||||
android:singleLine="true"
|
||||
android:text="@string/errors_record"
|
||||
android:textColor="@color/colorTextGray"
|
||||
android:textSize="19sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
android:id="@+id/clear_all_icon"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:tint="@color/colorTextGray"
|
||||
android:tooltipText="@string/clear_all" />
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
android:id="@+id/export_all_icon"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@drawable/ic_export"
|
||||
android:tint="@color/colorTextGray"
|
||||
android:tooltipText="@string/export_all" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/list_no_data_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:text="@string/no_errors_data"
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@color/trans"
|
||||
android:dividerHeight="15dp"
|
||||
android:fadingEdgeLength="10dp"
|
||||
android:listSelector="@color/trans"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
android:paddingBottom="15dp"
|
||||
android:requiresFadingEdge="vertical"
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
104
app/src/main/res/layout/adapter_app_errors_record.xml
Normal file
104
app/src/main/res/layout/adapter_app_errors_record.xml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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="wrap_content"
|
||||
android:background="@drawable/bg_permotion_ripple"
|
||||
android:gravity="center|start"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
tools:ignore="ContentDescription,UseCompoundDrawables,SmallSp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
app:cardBackgroundColor="@color/trans"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center|start"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:gravity="center|start"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/colorTextGray"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errors_time_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="1"
|
||||
android:alpha="0.85"
|
||||
android:ellipsize="start"
|
||||
android:gravity="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center|start"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_type_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/bg_red_round"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingTop="0.5dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingBottom="0.5dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_msg_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/error_type_icon"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginEnd="10dp" />
|
||||
</LinearLayout>
|
@@ -28,4 +28,8 @@
|
||||
<string name="print_to_logcat_success">コンソールに印刷されていました</string>
|
||||
<string name="output_stack_success">エクスポートされたエラースタックされていました</string>
|
||||
<string name="output_stack_fail">エラースタックのエクスポートに失敗しました</string>
|
||||
<string name="export_all">すべてエクスポート</string>
|
||||
<string name="clear_all">すべてクリア</string>
|
||||
<string name="errors_record">エラー履歴記錄</string>
|
||||
<string name="no_errors_data">一時的にエラーなデータレコードはありません</string>
|
||||
</resources>
|
@@ -28,4 +28,8 @@
|
||||
<string name="print_to_logcat_success">已打印到控制台</string>
|
||||
<string name="output_stack_success">已导出异常堆栈</string>
|
||||
<string name="output_stack_fail">导出异常堆栈失败</string>
|
||||
<string name="export_all">导出全部</string>
|
||||
<string name="clear_all">清空全部</string>
|
||||
<string name="errors_record">异常历史记录</string>
|
||||
<string name="no_errors_data">暂时没有异常数据记录</string>
|
||||
</resources>
|
@@ -28,4 +28,8 @@
|
||||
<string name="print_to_logcat_success">已打印到控制台</string>
|
||||
<string name="output_stack_success">已導出異常堆棧</string>
|
||||
<string name="output_stack_fail">導出異常堆棧失敗</string>
|
||||
<string name="export_all">導出全部</string>
|
||||
<string name="clear_all">清空全部</string>
|
||||
<string name="errors_record">異常歷史記錄</string>
|
||||
<string name="no_errors_data">暫時沒有異常數據紀錄</string>
|
||||
</resources>
|
@@ -28,4 +28,8 @@
|
||||
<string name="print_to_logcat_success">已打印到控制台</string>
|
||||
<string name="output_stack_success">已導出異常堆棧</string>
|
||||
<string name="output_stack_fail">導出異常堆棧失敗</string>
|
||||
<string name="export_all">導出全部</string>
|
||||
<string name="clear_all">清空全部</string>
|
||||
<string name="errors_record">異常歷史記錄</string>
|
||||
<string name="no_errors_data">暫時沒有異常數據紀錄</string>
|
||||
</resources>
|
@@ -28,4 +28,8 @@
|
||||
<string name="print_to_logcat_success">已打印到控制台</string>
|
||||
<string name="output_stack_success">已導出異常堆棧</string>
|
||||
<string name="output_stack_fail">導出異常堆棧失敗</string>
|
||||
<string name="export_all">導出全部</string>
|
||||
<string name="clear_all">清空全部</string>
|
||||
<string name="errors_record">異常歷史記錄</string>
|
||||
<string name="no_errors_data">暫時沒有異常數據紀錄</string>
|
||||
</resources>
|
@@ -27,4 +27,8 @@
|
||||
<string name="print_to_logcat_success">Printed to logcat</string>
|
||||
<string name="output_stack_success">Export exception stack succeeded</string>
|
||||
<string name="output_stack_fail">Failed to export exception stack</string>
|
||||
<string name="export_all">Export all</string>
|
||||
<string name="clear_all">Clear all</string>
|
||||
<string name="errors_record">AppErrorsRecord</string>
|
||||
<string name="no_errors_data">No errors data for now</string>
|
||||
</resources>
|
Reference in New Issue
Block a user