From c84501c18ed58f6b9f468c1b9edb72ba61df9a25 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Sat, 22 Jan 2022 12:39:51 +0800 Subject: [PATCH] fix bug --- .../xyz/fycz/myreader/ui/activity/CrashActivity.java | 5 +++++ app/src/main/res/layout/activity_crash.xml | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/xyz/fycz/myreader/ui/activity/CrashActivity.java b/app/src/main/java/xyz/fycz/myreader/ui/activity/CrashActivity.java index 02ea0c3..1bf4d04 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/activity/CrashActivity.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/activity/CrashActivity.java @@ -176,6 +176,11 @@ public class CrashActivity extends BaseActivity { }); } + @Override + public void onBackPressed() { + binding.ivCrashRestart.performClick(); + } + /** * 判断当前设备是否是平板 */ diff --git a/app/src/main/res/layout/activity_crash.xml b/app/src/main/res/layout/activity_crash.xml index 522491c..4a904c1 100644 --- a/app/src/main/res/layout/activity_crash.xml +++ b/app/src/main/res/layout/activity_crash.xml @@ -26,7 +26,8 @@ android:id="@+id/iv_crash_info" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginHorizontal="10dp" + android:padding="5dp" + android:layout_marginHorizontal="5dp" android:background="?android:attr/selectableItemBackground" app:srcCompat="@drawable/ic_info" app:tint="@color/textPrimary"/> @@ -49,7 +50,8 @@ android:id="@+id/iv_crash_share" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginHorizontal="10dp" + android:layout_marginHorizontal="5dp" + android:padding="5dp" android:background="?android:attr/selectableItemBackground" app:srcCompat="@drawable/ic_share" app:tint="@color/textPrimary"/> @@ -58,7 +60,8 @@ android:id="@+id/iv_crash_restart" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginHorizontal="10dp" + android:padding="5dp" + android:layout_marginHorizontal="5dp" android:background="?android:attr/selectableItemBackground" app:srcCompat="@drawable/ic_exit" app:tint="@color/textPrimary"/>