forked from joejulian/gio
app/internal/window: [Android] work around flickering on ChromeOS
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import android.app.Fragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
import android.text.Editable;
|
||||
@@ -56,6 +57,10 @@ public final class GioView extends SurfaceView implements Choreographer.FrameCal
|
||||
// Late initialization of the Go runtime to wait for a valid context.
|
||||
Gio.init(context.getApplicationContext());
|
||||
|
||||
// Set background color to transparent to avoid a flickering
|
||||
// issue on ChromeOS.
|
||||
setBackgroundColor(Color.argb(0, 0, 0, 0));
|
||||
|
||||
ViewConfiguration conf = ViewConfiguration.get(context);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
scrollXScale = conf.getScaledHorizontalScrollFactor();
|
||||
|
||||
Reference in New Issue
Block a user