mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Prevent onLayout crash
This commit is contained in:
31
app/src/main/java/eu/faircode/email/NestedScrollViewEx.java
Normal file
31
app/src/main/java/eu/faircode/email/NestedScrollViewEx.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package eu.faircode.email;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
|
||||
public class NestedScrollViewEx extends NestedScrollView {
|
||||
public NestedScrollViewEx(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public NestedScrollViewEx(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public NestedScrollViewEx(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
try {
|
||||
super.onLayout(changed, l, t, r, b);
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user