So, this is the HTML I want to load in my WebView
and it doesn't resize. I'm using the same Activity to load these HTMLs (same width): this and this
I have used many things to resize and I get no resized with none:
webView.getSettings().setUseWideViewPort(true); webView.getSettings().setLoadWithOverviewMode(true);
(picture)
Tried as well on WebClient.onPageFinished
I'm getting my page refreshed (or the View) as well every 1 - 3 seconds automatically, getting a lot of messages from Logcat like:
onSizeChanged - w:480 h:0
onSizeChanged - w:480 h:491
onSizeChanged - w:480 h:1887
and many more...
WebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
(picture)Tried
android:configChanges="orientation|screenSize"
Tried this(on OS)
The weird thing is that other pages work corretly.
My code is this:
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.setBackgroundColor(Color.TRANSPARENT);
webView.loadUrl(URL);
WebViewClient client = new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
pb.setVisibility(ProgressBar.GONE);
}
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url != null && url.startsWith("http://")) {
view.getContext().startActivity(
new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
return true;
} else {
return false;
}
}
};
webView.setWebViewClient(client);
Thanks in advance.