WebView not rendering content properly in Android L - android

I am facing problem loading html content in Android L (preview) WebView. Sometimes when html content loads, it does not show up in WebView. I have to tap in WebView or somewhere inside the screen then it shows up the content. There is no problem with WebView in Android KitKat and lower versions. It happens only with Android L WebView. Please note that I have WebView inside ScrollView. This is my primary requirement as there can be multiple WebViews inside the scrollable view.

Related

WebView content cut-off

I am currently copying the whole HTML code in a certain file and saving it on the App.
On load of the app the web contents of the webview is complete but sometimes when shifting to from pager item to another it sometimes has this cut-off
I already tried this one:
mAdvertisementWebView.settings.loadWithOverviewMode = true
It is also appearing on a phone device as well.

On Android 4.4.2, WebView loads slowly

I have a list and when I click on one item of the list, one HTML page is called like that:
webView.loadDataWithBaseURL("file:///android_asset/", content, "text/html", "utf-8", "about:blank");
Inside this webview, there is HTML5 video (I'm using this library https://github.com/cprcrack/VideoEnabledWebView). When I enter in full screen mode with the video, then return to the list and click on another item to load an HTML page, this page takes too long to load (like minutes).
This only happens on some 4.4.2 devices, on the emulator it loads quickly.
My hardwareAccelerated is enabled.
I found out that if I rotate the screen, the second page loads quickly. But I tried to reload the page ou setting to clear the view, but it didn't work.
Does anyone has any idea why this happens?
I'm also getting this error:
[ERROR:in_process_view_renderer.cc(193)] Failed to request GL process. Deadlock likely: 0
If your working on web view i would suggest to look on crosswalk and chromium. Its best way to bring in hardware acceleration into the project.

Eclipse Android Webview, how to center the content

I am nearly done with my first app, but I am still working on some little issues.
My main problem is that I am loading a normal html page, but I have no access to the html code.
Now I want to center the page in the webview module, because the page is also centered, so that when I am loading the page, I have to scroll all the time to the right side and that is really anoying.
So how do I do that, that the webview modul automatically loads the page already centered and the user of the app sees the middle of the page?
You mean, you dont want horizontal scroll,for that try this :
mwebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);

How can I force a webview on Android to scroll to the top of the page?

I have a couple of html forms inside of an Android app.
To hide the background image of the app on the webview the height of the html page is set to 1000px via CSS (it's also set to 100% via Java for the webview, but that does not always work).
Problem:
Form A on page 1 is rather long, the submitbutton is at the end of the page. Form B on page 2 is short.
After posting form A the app does not scroll to the top of page 2 but stays at the same position. As post B is short the user sees nothing but the empty background. Not good.
We tried the following methods:
pageUp (from the Java SDK)
scrollTo() (from the Java SDK)
insert a "<a name="top"></a>" in the html code of the forms and use "window.location.hash="top" from within the app to address the anchor
The last way works almost everywhere but not on Samsung devices (reported as broken with Samsung S2 and Ace). Are there other options we might have missed?
We ended up removing the 1000px css hack.

Problem with contents of WebView in Android

I created a WebView in android inside an Activity of an TabActivity
but when I load the contents inside the WebView and I scroll the WebView (that is not full screen) or I change the tab, some contents of WebView like flash scripts or built-in controls
do not disappear covering the elements of the layout
I tried to disable plugins in WebView without success, and I need the zoom function so I have to keep the built-in controls enabled
how can I solve this? thanks

Categories

Resources