Modified view removal in InAppBrowser to try and fix a crash

This commit is contained in:
KhatibFX 2023-04-07 21:38:25 +08:00
parent a42b0e4dfd
commit e0c5c8ff5c
2 changed files with 5 additions and 3 deletions

View File

@ -541,7 +541,9 @@ public class InAppBrowserActivity extends AppCompatActivity implements InAppBrow
} }
ViewGroup vg = (ViewGroup) (webView.getParent()); ViewGroup vg = (ViewGroup) (webView.getParent());
if (vg != null) { if (vg != null) {
vg.removeView(webView); //Modified view removal to try and fix a crash
webView.visibility = View.GONE;
// vg.removeView(webView);
} }
webView.setWebChromeClient(new WebChromeClient()); webView.setWebChromeClient(new WebChromeClient());
webView.setWebViewClient(new WebViewClient() { webView.setWebViewClient(new WebViewClient() {

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# This is a generated file; do not edit or check into version control. # This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/3.3.6" export "FLUTTER_ROOT=/Users/ahmedelkhatib/fvm/versions/3.3.4"
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example" export "FLUTTER_APPLICATION_PATH=/Users/ahmedelkhatib/Development/Flutter/projects/flutter_inappwebview/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_DIR=build"