Questions tagged [android-webview]

Part of the Android API. A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity.

A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity. It uses the WebKit rendering engine to display web pages and includes methods to navigate forward and backward through a history, zoom in and out, perform text searches and more.

Apart loading from the web, this component supports loading from assets (location file:///android_asset/, this folder must be called "assets" and be present in the project root) or other arbitrary folder. It also supports JavaScript but it is disabled by default and must be explicitly turned on.

Documentation for WebView.

7462 questions
3
votes
1 answer

How to call Barcode Scanner in Webview, and passing it back?

I have following scenario: Click a link or button. Open up Barcode Scanner by ZXing. Scan the code. Pass the decoded data to other webpages. For 1 and 4, it must be performed inside WebView. The problem I faced was, using this…
Tan Jia Ming
  • 435
  • 1
  • 6
  • 22
3
votes
1 answer

Loading a custom css into a WebView

How do I inject a custom CSS file into a WebView? I am using Jsoup to extract the HTML Code, then I remove the existing CSS file. I do not know how to inject my local CSS file to the HTML code properly. I am using Stackoverflow as an example. This…
Ammar
  • 1,203
  • 5
  • 27
  • 64
3
votes
1 answer

Android Webview HTML Fixed Element overflow-x:hidden Not Working

I have a position:fixed Element A that contains Element B that's much wider and sometimes taller than A. I set Element A to overflow-x:hidden to prevent scrolling in the horizontal direction but it's not working. This issue doesn't occur in iOS's…
Jasoneer
  • 2,078
  • 2
  • 15
  • 20
3
votes
2 answers

How can I load Json data to WebView in Android?

I am trying to parse JSON data which is in HTML format. I am not understanding how to implement it. My JsonObject as shown below : {"Content": { "PageContent":"\r\n\t
Rahul Baradia
  • 11,802
  • 17
  • 73
  • 121
3
votes
3 answers

Loading https getting white screen in android webview in version 2.2

I need to load a https url in android webview but it gets loaded with white screen. I have also handled public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) but still getting white screen on getting loaded with the…
Mukunda
  • 1,593
  • 3
  • 26
  • 45
3
votes
1 answer

Android application exits without any exception

I'm building an application that shows in a WebView some remote data that is cached in SQLite db. The data is being requested by JavaScript function from WebView via JavaScript interface. When user types into an input element on the page, JavaScript…
Swav
  • 841
  • 8
  • 24
3
votes
2 answers

Android WebViewClient not OverridingURL

I would like to catch local anchor clicks. These anchors are local within the page i.e., href="#link_1". What is the best way to catch these clicks? OverrideURL does not fire on them? I am loading a new page based on the anchor href.
SoundsDangerous
  • 708
  • 6
  • 13
3
votes
1 answer

webview inside tabview getting exception

In my app I am using web-view inside tab-view.In my app i used 5 tabs.In my app one activity having connect button available in side tabs.whenever connect button clicked web-view opened inside tabs fine.In that web-view Facebook URL is…
rams
  • 1,558
  • 7
  • 25
  • 48
3
votes
0 answers

Android WebView shows extra horizontal white spaces in Android 4.0+ devices

In my code attached, I am trying to use two Android WebViews (webView1 and webView2) to display a javaScript enabled menu inside webView1 and a page showing the result of menu-click triggered in webView1 inside webView2. As the code show, I am…
3
votes
1 answer

images inside webview are getting blurred on touch

I am using a webview inside fragment and loading html page from assets folder. My issue is when I scroll the page all images are getting blurred? After putting some logs this is happening onTouch of webview. I am not getting how do I stop it. I have…
Ankit
  • 1,916
  • 2
  • 20
  • 33
3
votes
1 answer

Android WebView shows plain text instead of html

First, I am going to say this is only an issue on Android 2 and older (4 seems to be unaffected and I didn't test 3). I have a WebView that loads html from a string. The HTML looks like this:
xbakesx
  • 13,202
  • 6
  • 48
  • 76
3
votes
1 answer

WebView fading edge is a solid block

I am trying to get fading edges working for Android 4.1. I've figured out I need "android:requiresFadingEdge", but now instead of a fade, I get a solid block that appears on the top/bottom when I'm scrolling.
user901309
3
votes
0 answers

Android WebView and default browser with different UserAgent

From some reason on several android devices, I'm getting different User Agent from the browser and from my application's WebView. I have used this line of code to get the UA in the app: new WebView(this).getSettings().getUserAgentString(); This is…
SuperFrog
  • 7,631
  • 9
  • 51
  • 81
3
votes
1 answer

Android: Unable to load simple html data having javascript file in WebView?

WebView web_view = (WebView) findViewById(R.id.webView1); web_view.getSettings().setJavaScriptEnabled(true); web_view.getSettings().setPluginsEnabled(true); web_view.getSettings().setAllowFileAccess(true); String…
Teekam
  • 939
  • 4
  • 14
  • 26
3
votes
0 answers

WebView HTML5 Video or 3D renderer cropped of Android < 4.1

I use WebView widget in my project to display HTML5 videos or different content in HTML5 or not. I have no problem to render these HTML5 pages (using video or not) if my WebView is in MATCH_PARENT and fit my screen device. A problem occurred when I…
1 2 3
99
100