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.
Related
I implement webview in recyclerview item and Webview result does not set properly.
Click here for image
I think you are trying to build the tab minimising functionality similar to chrome/firefox, instead of using webview inside the minimised items, you can map every page to an image and store it internal storage, also, you don't want the user to interact with pages in minimised state, so webview is not required.
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.
I'm currently working on making hybrid-app.
(Using jquery mobile.)
I have some problems on rendering webview in the application.
There are lists and detail pages with html. when the transition happens, the screen displays white screen, a previous page for a seconds, white screen and then displays detail page. And it goes to the same when I click a back button.
is this a cache problem or hardware accelerate?
I separated css file from one whole one while the application was on service. And there was css rendering problem until i did "clear date" on mobile not "clear cache". CSS didn't seem like working at all on the page.
Is this a issue of jquery mobile? or is this also the cache problem? then why didn't it work when i did "clear cache" but "clear data"?
And what will happen if i put this?:
context.deleteDatabase("webview.db");
context.deleteDatabase("webviewCache.db");
will all data saved be deleted? like, settings people using now?
Two topics I noticed in the context of page transitions and jqm:
A) rendering of a page takes some time and have impact on the transition. If you generate/update your detailed page, wait until everything has finished before the page transition starts (can be achieved with setTimeout(..., 10)
B) unfortunately, all pages in jqm are scrolling together and are not independent from each other. I noticed that before a page transition starts, the current page is scrolled to the top. Afterwards the new page appears. Looks ugly... Unfortunately several css settings must be modified to change this behaviour.
Hope this helps,
Andreas
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);
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.