mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-17 22:27:19 +00:00
fix(webview): restore hardware acceleration and load test_red.html to establish baseline
This commit is contained in:
parent
76a39ff701
commit
61ce24a320
1 changed files with 7 additions and 16 deletions
|
|
@ -30,14 +30,11 @@ public class MainActivity extends BridgeActivity {
|
|||
private void loadCustomUrl() {
|
||||
WebView webView = this.bridge.getWebView();
|
||||
|
||||
runOnUiThread(() -> {
|
||||
// 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 BLUE to distinguish from default black
|
||||
webView.setBackgroundColor(0xFF0000FF);
|
||||
// Disable software rendering (Revert)
|
||||
// webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
|
||||
// Set WebView background to BLACK
|
||||
webView.setBackgroundColor(0xFF000000);
|
||||
|
||||
WebSettings settings = webView.getSettings();
|
||||
settings.setJavaScriptEnabled(true);
|
||||
|
|
@ -73,14 +70,8 @@ public class MainActivity extends BridgeActivity {
|
|||
// NUCLEAR CACHE CLEAR
|
||||
webView.clearCache(true);
|
||||
webView.clearHistory();
|
||||
webView.clearFormData();
|
||||
webView.clearSslPreferences();
|
||||
|
||||
// TEST 1: Direct HTML Injection (Bypasses File System)
|
||||
String htmlData = "<html><body style='background-color:green;'><h1>SOFTWARE RENDERING WORKING</h1></body></html>";
|
||||
webView.loadDataWithBaseURL(null, htmlData, "text/html", "UTF-8", null);
|
||||
|
||||
// Force load our local test file
|
||||
// webView.loadUrl("file:///android_asset/public/test_red.html");
|
||||
// LOAD THE RED FILE
|
||||
webView.loadUrl("file:///android_asset/public/test_red.html");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue