Prevent crash

pull/207/head
M66B 3 years ago
parent 4796330283
commit 4085fdf9c1

@ -44,6 +44,15 @@ public class ConstraintLayoutEx extends ConstraintLayout {
super(context, attrs, defStyleAttr, defStyleRes); super(context, attrs, defStyleAttr, defStyleRes);
} }
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
try {
super.onLayout(changed, left, top, right, bottom);
} catch (Throwable ex) {
Log.e(ex);
}
}
/* /*
java.lang.IndexOutOfBoundsException: 2, 0 java.lang.IndexOutOfBoundsException: 2, 0
at android.text.PackedIntVector.getValue(PackedIntVector.java:75) at android.text.PackedIntVector.getValue(PackedIntVector.java:75)

@ -44,6 +44,15 @@ public class FrameLayoutEx extends FrameLayout {
super(context, attrs, defStyleAttr, defStyleRes); super(context, attrs, defStyleAttr, defStyleRes);
} }
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
try {
super.onLayout(changed, left, top, right, bottom);
} catch (Throwable ex) {
Log.e(ex);
}
}
@Override @Override
public boolean dispatchTouchEvent(MotionEvent ev) { public boolean dispatchTouchEvent(MotionEvent ev) {
try { try {

Loading…
Cancel
Save