work around crash on Android 8 (#731)
This commit is contained in:
parent
dbdc597207
commit
2a6f6c4092
|
@ -31,6 +31,7 @@ import android.graphics.PorterDuff;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Parcel;
|
||||
|
@ -496,6 +497,11 @@ public final class ComposeActivity
|
|||
textEditor.setSelection(textEditor.length());
|
||||
}
|
||||
|
||||
// work around Android platform bug -> https://issuetracker.google.com/issues/67102093
|
||||
if(Build.VERSION.SDK_INT == Build.VERSION_CODES.O || Build.VERSION.SDK_INT == Build.VERSION_CODES.O_MR1 ) {
|
||||
textEditor.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
}
|
||||
|
||||
// Initialise the content warning editor.
|
||||
contentWarningEditor.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue