Problem with contents of WebView in Android - 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

Related

How to set WebView properly in fixed size properly

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.

$(window).scroll event not triggered in android WebView

In android app I have webView page that use jquery plugin for lazyload. In mobile browser it work fine but not in webView. After debug I find out that even this doesnt trigger alert.
$(window).scroll(function() {
alert("Scrolled");
}
Does there is special way to handle scroll events in webView?
PS For lazy load i use this plugin http://www.appelsiini.net/projects/lazyload
window.onscroll works with the WebView. Some things to check:
you have placed the WebView in a ScollView and/or set it's height to wrap_contents,
the contents of the WebView is too short to scroll,
you haven't implemented the WebChromeClient.onJsAlert callback to handle alert. By default the WebView doesn't display a popup.

WebView not rendering content properly in Android L

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.

Jump to anchor from button

What's the better solution to navigate to a certain point of a html page in a webview using android native buttons?
Is it possible to navigate html anchors?
What about using anchors like this:
First section
And then in your button's OnClick handler make your webview navigate to: http://yoururl.com/page.html#first
Does that work?
It seems there are some issues when the WebView is inside a ScrollView, you can read about it here: Android Webview Anchor Link (Jump link) not working

How do you create the Browser layout (search bar on top, webview on bottom)?

I'm trying to mimic the default android Browser app layout, which has a "search_bar" on top and then a "webview" right below it. The user can scroll both items up, all the while the scroll bar only appears to the right of the webview (not both the webview and the search bar).
I've tried putting both the webview and the searchbar into a scrollview, but this shows the scrollbar next to the search_bar.
If you need to mimic the exact layout of default browser have a look at it's source code:
Where can I find Android source code online?
If you need only browser source have a look here:
https://android.googlesource.com/platform/packages/apps/Browser
From what I can see (a quick look at it) it is more complicated layout, but you may start analysing it from:
Browser\res\layout\browser_subwindow.xml
which directly includes WebView. This file is directly loaded by Tab... Go ahaed and analyse it on your own it is pretty simple as it is a regular Android application.
Hope it helps.

Categories

Resources