Tag: webview

WebView doesn't load my HTML the second time?

I’ve created a small Activity which is capable of loading two different HTML strings in a webview. When I run the Activity it starts by loading the String from the page_1 variable. So far so good. The page shows as expected. I’ve added an onFling listener which should make the activity load the content of […]

Is WebRTC Coming to Android WebView? When?

I am seeing some contradicting evidence to the question of support of WebRTC in Android’s WebView, and I was wondering if anyone might know anything about Google’s plans to support WebRTC in the WebView in the future. On one hand, I have read a post by Paul Irish claiming that WebRTC will be supported on […]

Viewport fit screen width and big images

I’m trying to use a WebView for displaying a big image with the built-in multitouch and trying to avoid memory crashes. I set the webView this way: setInitialScale(20); WebSettings settings = getSettings(); settings.setJavaScriptEnabled(true); settings.setUseWideViewPort(true); settings.setLoadWithOverviewMode(true); settings.setSupportZoom(true); settings.setBuiltInZoomControls(true); And then load the following code: <head> <meta name=”viewport” content=”width=device-width, user-scalable=yes” /> </head> <body style=”margin: 0; padding: 0″> […]

How to make text fit to screen (text-wrap) in WebView with KitKat

I’m having an issue in my WebView with Android 4.4. Before KitKat, text was fitting automatically with all devices resolutions in webviews. But today it’s not fitting automatically anymore with 4.4. I think it’s because of the WebView’s update based on Chromium with KitKat. Here are 2 screenshots of the same page : One from […]

Fit image in webview

I am planning to display images from SD card in a webview in order to take advantage of he built in zoom capabilities of webview. However, I am facing an issue with displaying images that are bigger than screen size (e.g. 1800×1200) to fit the screen initially, like in an ImageView. I want the image […]

Phonegap Media API (Android) – Media is not defined

I want to build a Android WebView app, which plays a sound when the user presses a button.For some reason I can’t get the PhoneGap media API to work. It keep showing: Uncaught ReferenceError: Media is not defined at file:///android_asset/www/script.js:3 Here is my code: $(document).ready(function(){ var myMedia = new Media(“/android_asset/www/one.mp3”); $(‘.one’).click(function(){ myMedia.play(); }); }); Anyone […]

Remove focus overlay-color of webview

I have a WebView that loads a site, once I press some of my elements of that site, the WebView places some kind of blue overlay over the pressed element. Is there anyway to remove this behaviour? Thanks in advance!

How to get Webview iframe link to launch the browser?

I’m using a WebView to display a page in which the html includes an iframe where src=”xxxxx.php”. This iframe loads as an ad image with an underlying link. If I click on that image (link), it tries to load the new page within original iframe (which doesn’t show much in that little space). What I […]

how to get the current page url from the web view in android

Using webview.loadUrl(url) method I open an url. If I click any Button on the view it directs to another page. Now I want to get the url of the directed page. how can I get it? I also want the content that is displayed on the webview. How to get the content of the WebView […]

How to make a full screen webview

How to make the webview of an android application full screen. I have added the webview on a layout xml file but it doesn’t stretches out till the edges of the layout, there is some type of margin along all the side of the webview. I am also adding an image to give you guys […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.