pull/374/head
okjack 2 years ago
parent cc30cd4ea2
commit 0b71727c14
  1. 6
      app/src/main/java/com/fongmi/android/tv/ui/custom/CustomWebView.java

@ -77,6 +77,11 @@ public class CustomWebView extends WebView {
setWebViewClient(webViewClient());
}
private void addView() {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(1, 1);
if (App.activity() != null) App.activity().addContentView(this, layoutParams);
}
public CustomWebView start(String key, String from, Map<String, String> headers, String url, String click, ParseCallback callback, boolean detect) {
App.post(timer, Constant.TIMEOUT_PARSE_WEB);
this.callback = callback;
@ -84,6 +89,7 @@ public class CustomWebView extends WebView {
this.click = click;
this.from = from;
this.key = key;
addView();
start(url, headers);
return this;
}

Loading…
Cancel
Save