Skip to content

Commit 31dbbc8

Browse files
Changes in UI and updated dependencies.
1 parent 5627c58 commit 31dbbc8

File tree

10 files changed

+65
-17
lines changed

10 files changed

+65
-17
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
jcenter()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.3.2'
9+
classpath 'com.android.tools.build:gradle:3.4.1'
1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1111

1212
// NOTE: Do not place your application dependencies here; they belong

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
-2.16 KB
Loading

library/build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
defaultConfig {
1111
minSdkVersion 15
1212
targetSdkVersion 28
13-
versionCode 2
14-
versionName "15.4.19"
13+
versionCode 3
14+
versionName "30.5.19"
1515
}
1616
buildTypes {
1717
release {
@@ -23,6 +23,12 @@ android {
2323

2424
dependencies {
2525
implementation fileTree(include: ['*.jar'], dir: 'libs')
26-
26+
27+
//ANDROID SUPPORT LIBRARIES
2728
implementation 'com.android.support:appcompat-v7:28.0.0'
29+
implementation 'com.android.support:support-v4:28.0.0'
30+
implementation 'com.android.support:recyclerview-v7:28.0.0'
31+
implementation 'com.android.support:design:28.0.0'
32+
implementation "com.android.support:preference-v7:28.0.0"
33+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
2834
}

library/src/main/java/com/kinda/crash/activity/DefaultErrorActivity.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
package com.kinda.crash.activity;
22

3+
import android.annotation.SuppressLint;
34
import android.content.ClipData;
45
import android.content.ClipboardManager;
56
import android.content.DialogInterface;
67
import android.content.res.TypedArray;
8+
import android.os.Build;
79
import android.os.Bundle;
810
import android.support.annotation.Nullable;
911
import android.support.v4.content.res.ResourcesCompat;
1012
import android.support.v7.app.AlertDialog;
1113
import android.support.v7.app.AppCompatActivity;
1214
import android.util.TypedValue;
1315
import android.view.View;
16+
import android.view.Window;
17+
import android.view.WindowManager;
1418
import android.widget.Button;
1519
import android.widget.ImageView;
1620
import android.widget.TextView;
@@ -22,8 +26,17 @@
2226

2327
public final class DefaultErrorActivity extends AppCompatActivity {
2428

29+
@SuppressLint("PrivateResource")
2530
@Override
2631
protected void onCreate(@Nullable Bundle savedInstanceState) {
32+
33+
setTheme(R.style.Theme_AppCompat_Light_NoActionBar);
34+
35+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
36+
Window w = getWindow();
37+
w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
38+
}
39+
2740
super.onCreate(savedInstanceState);
2841

2942
//This is needed to avoid a crash if the developer has not specified

library/src/main/java/com/kinda/crash/config/CrashConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ public Builder restartActivity(@Nullable Class<? extends Activity> restartActivi
285285
* If not set or set to null, no events will be reported.
286286
*
287287
* @param eventListener The event listener.
288-
* @throws IllegalArgumentException if the eventListener is an inner or anonymous class
289288
*/
290289
@NonNull
291290
public Builder eventListener(@Nullable CrashActivity.EventListener eventListener) {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp" android:tint="#FFFFFF"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="#FF000000" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp" android:tint="#FFFFFF"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="#FF000000" android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/>
5+
</vector>

library/src/main/res/layout/crash_default_error_activity.xml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
34
android:layout_width="match_parent"
45
android:layout_height="match_parent"
5-
android:gravity="center">
6+
android:background="#D50000">
67

7-
<ScrollView
8+
<android.support.v7.widget.CardView
89
android:layout_width="match_parent"
9-
android:layout_height="wrap_content">
10+
android:layout_height="wrap_content"
11+
android:layout_centerInParent="true"
12+
app:cardBackgroundColor="#FFFFFF"
13+
app:cardCornerRadius="30dp"
14+
app:cardElevation="0dp"
15+
app:cardPreventCornerOverlap="true"
16+
app:cardUseCompatPadding="true">
1017

1118
<LinearLayout
1219
android:layout_width="match_parent"
@@ -37,18 +44,25 @@
3744

3845
<Button
3946
android:id="@+id/crash_error_activity_restart_button"
40-
android:layout_width="wrap_content"
47+
android:layout_width="200dp"
4148
android:layout_height="wrap_content"
4249
android:layout_marginTop="@dimen/customactivityoncrash_activity_vertical_margin"
43-
android:text="@string/customactivityoncrash_error_activity_close_app" />
50+
android:textColor="@android:color/white"
51+
android:textStyle="bold"
52+
android:background="#D50000"
53+
android:text="@string/customactivityoncrash_error_activity_close_app"
54+
android:drawableBottom="@drawable/crash_ic_close" />
4455

4556
<Button
4657
android:id="@+id/crash_error_activity_more_info_button"
47-
style="?borderlessButtonStyle"
48-
android:layout_width="wrap_content"
58+
android:layout_width="150dp"
4959
android:layout_height="wrap_content"
5060
android:text="@string/customactivityoncrash_error_activity_error_details"
51-
android:textColor="?colorPrimary" />
61+
android:layout_marginTop="@dimen/customactivityoncrash_activity_vertical_margin"
62+
android:textColor="@android:color/white"
63+
android:textStyle="bold"
64+
android:background="#D50000"
65+
android:drawableBottom="@drawable/crash_ic_error"/>
5266
</LinearLayout>
53-
</ScrollView>
67+
</android.support.v7.widget.CardView>
5468
</RelativeLayout>

sample/build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "com.kinda.crash.sample"
88
minSdkVersion 15
99
targetSdkVersion 28
10-
versionCode 2
11-
versionName "15.4.19"
10+
versionCode 3
11+
versionName "30.5.19"
1212
}
1313
buildTypes {
1414
debug {
@@ -25,7 +25,13 @@ android {
2525
dependencies {
2626
implementation fileTree(include: ['*.jar'], dir: 'libs')
2727

28+
//ANDROID SUPPORT LIBRARIES
2829
implementation 'com.android.support:appcompat-v7:28.0.0'
30+
implementation 'com.android.support:support-v4:28.0.0'
31+
implementation 'com.android.support:recyclerview-v7:28.0.0'
32+
implementation 'com.android.support:design:28.0.0'
33+
implementation "com.android.support:preference-v7:28.0.0"
34+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
2935

3036
//CrashX library
3137
implementation project(":library")

0 commit comments

Comments
 (0)