From 504876ee724df61fc915c116896d064a6d240bd5 Mon Sep 17 00:00:00 2001 From: MrPiglr Date: Thu, 12 Feb 2026 13:22:44 -0700 Subject: [PATCH] fix(webview): disable hardware acceleration to fix black screen rendering --- .../app/src/main/java/com/aethex/os/MainActivity.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/aethex/os/MainActivity.java b/android/app/src/main/java/com/aethex/os/MainActivity.java index 77d59ea..f5a6756 100644 --- a/android/app/src/main/java/com/aethex/os/MainActivity.java +++ b/android/app/src/main/java/com/aethex/os/MainActivity.java @@ -14,6 +14,8 @@ import android.util.Log; import android.os.Handler; +import android.view.View; + public class MainActivity extends BridgeActivity { @Override @@ -29,11 +31,13 @@ public class MainActivity extends BridgeActivity { WebView webView = this.bridge.getWebView(); runOnUiThread(() -> { - Toast.makeText(MainActivity.this, "Resetting & Loading...", Toast.LENGTH_SHORT).show(); + // DISABLE HARDWARE ACCELERATION - Common fix for black screens on specific devices + webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + Toast.makeText(MainActivity.this, "Software Rendering Enabled", Toast.LENGTH_SHORT).show(); }); - // Set WebView background to BLACK - webView.setBackgroundColor(0xFF000000); + // Set WebView background to BLUE to distinguish from default black + webView.setBackgroundColor(0xFF0000FF); WebSettings settings = webView.getSettings(); settings.setJavaScriptEnabled(true);