mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-26 16:03:18 +00:00
Workaround Android bug
This commit is contained in:
parent
19e3241be2
commit
f45145d225
1 changed files with 19 additions and 0 deletions
|
@ -20,6 +20,7 @@ package eu.faircode.email;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ public class FixedTextView extends AppCompatTextView {
|
||||||
try {
|
try {
|
||||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
|
Log.w(ex);
|
||||||
/*
|
/*
|
||||||
java.lang.ArrayIndexOutOfBoundsException: length=...; index=...
|
java.lang.ArrayIndexOutOfBoundsException: length=...; index=...
|
||||||
at android.text.TextLine.measure(TextLine.java:316)
|
at android.text.TextLine.measure(TextLine.java:316)
|
||||||
|
@ -58,6 +60,23 @@ public class FixedTextView extends AppCompatTextView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDraw(Canvas canvas) {
|
||||||
|
try {
|
||||||
|
super.onDraw(canvas);
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.w(ex);
|
||||||
|
/*
|
||||||
|
java.lang.ArrayIndexOutOfBoundsException: length=74; index=74
|
||||||
|
at android.text.TextLine.draw(TextLine.java:241)
|
||||||
|
at android.text.Layout.drawText(Layout.java:545)
|
||||||
|
at android.text.Layout.draw(Layout.java:289)
|
||||||
|
at android.widget.TextView.onDraw(TextView.java:6972)
|
||||||
|
at android.view.View.draw(View.java:19380)
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue