Fixed view hiding not working properly.
This commit is contained in:
parent
e0c5c8ff5c
commit
d3067e4162
|
@ -541,8 +541,12 @@ public class InAppBrowserActivity extends AppCompatActivity implements InAppBrow
|
||||||
}
|
}
|
||||||
ViewGroup vg = (ViewGroup) (webView.getParent());
|
ViewGroup vg = (ViewGroup) (webView.getParent());
|
||||||
if (vg != null) {
|
if (vg != null) {
|
||||||
//Modified view removal to try and fix a crash
|
// Modified view removal to try and fix a crash
|
||||||
webView.visibility = View.GONE;
|
for (int i = 0; i < vg.getChildCount(); i++) {
|
||||||
|
View v = vg.getChildAt(i);
|
||||||
|
v.visibility = View.GONE;
|
||||||
|
}
|
||||||
|
// instead of using
|
||||||
// vg.removeView(webView);
|
// vg.removeView(webView);
|
||||||
}
|
}
|
||||||
webView.setWebChromeClient(new WebChromeClient());
|
webView.setWebChromeClient(new WebChromeClient());
|
||||||
|
|
Loading…
Reference in New Issue