Use this tag for questions regarding managing settings state for a WebView on the Android OS
Questions tagged [android-websettings]
142 questions
3
votes
7 answers
How to prevent call of onDestroy() after onPause()?
In my android application I have noticed that on press of back key, after onPause() automatically, onDestroy() is getting called.
How do I prevent the application from calling onDestroy() after onPause()?
I dont want to destroy the instances after…

EnthuDeveloper
- 672
- 9
- 25
3
votes
0 answers
Android WebView not showing content at Api 20
I have a WebView in my app. It works properly but at Api 20, WebView does not show the content.
I checked the logs and see these errors
I/chromium: [INFO:CONSOLE(7)] "The key "shrink-to-fit" is not recognized and ignored.", source:…

ysfcyln
- 2,857
- 6
- 34
- 61
3
votes
3 answers
How to detect cache is existed for the webview in android?
In my android application need to detect cache is existed or not. Currently i am loading webpages if internet is available. If internet is not available loading pages from caches by using the following code.
if (networkInfo.isConnected()) {
…

Raghu Mudem
- 6,793
- 13
- 48
- 69
3
votes
0 answers
WebView vs. Chrome - very different
I am making an Android application using a webview for a part of the screen. The problem I am facing is that the webview is not displaying the webpage correctly.
Website: String webview_url = http://marci539.getmarci.com/?c=custom_skin_1
It displays…

sv94
- 131
- 2
- 15
3
votes
0 answers
When I set a WebView's viewport's width, its contentHeight seems incorrect
My goal is to create a WebView with small bounds, and have it animate smoothly to a predetermined width and whatever height is necessary to contain its contents, to give the impression of it expanding to its full size.
I don't want the contents of…

groucho
- 1,835
- 1
- 13
- 15
3
votes
3 answers
How can i load image url to fit my webview in android?
I am developing an android application.Here i am displaying a url image in webview. But the image is not fit to my webview. some one is suggested to use viewport concept. But i am not able to use that perfectly. I attached my issue in drawing form…

Raghu Mudem
- 6,793
- 13
- 48
- 69
3
votes
1 answer
WebView setAllowUniversalAccessFromFileURLs on versions lower then Api(16)
When I try to run some web pages in WebView, I get "Unsafe JavaScript attempt to access frame with URL data" error.
I read (somewhere on the web) that I should set the --allow-file-access-from-files switch.
On Android API16 and up I have the…

Asaf Pinhassi
- 15,177
- 12
- 106
- 130
2
votes
0 answers
"The key "target-densitydpi" is not supported." while Loading url in webVIew
am trying to launch a URl in webView But it is throwing an error like
"The key "target-densitydpi" is not supported."
I have tried adding setUseWideViewPort to webview but didnot work
We also tried by adding below line to web source code but…

konda rahul
- 141
- 1
- 1
- 11
2
votes
1 answer
the scrolling is working by reverse on WebView
I used WebView in my app and it sees the scrolling is not working properly, when I trying to scroll down the page does not go down and the reverse is true, but when I try to touch the screen and get off in reverse "touch with scroll up" It's…

Mahmoud Metawee
- 174
- 1
- 4
- 23
2
votes
2 answers
Web view desn't load on Oreo
Web view content doe not load in Oreo android. It keeps loading and then show white screen what could be the possible issue ?
`WebView mwebView = (WebView) findViewById(R.id.myWebView);
WebSettings webSettings =…

Chinthaka Devinda
- 997
- 5
- 16
- 36
2
votes
3 answers
How to stop video when press back button in Android
I want show video in WebView, and for this i want use this code :
WebSettings settings = post_content_web.getSettings();
post_content_web.setWebChromeClient(new WebChromeClient());
settings.setPluginState(WebSettings.PluginState.ON);
…
user7702411
2
votes
1 answer
Android Webview, back button does not work when a new link is opened through the webview
I have an android application with local html, css and javasccript files.
One of the pages contains a list of images, these images have a link to an external website attached to them.
Whenever I click on the link, the URL is opened in the webview.…

Mihir
- 31
- 6
2
votes
2 answers
Loading image url into webview
I'm trying to load image into a webview from http://loremflickr.com/ , but it doesn't seem to work on android 4.3 . Can anyone explain to me why and how can i fix this ?
it work fine for Android 4.4 and Android 5 but not 4.3
Here's my…

Salah Hammouda
- 303
- 2
- 19
2
votes
2 answers
do webview settings affect all webview?
Having WebView, and some settings.
The question is will these settings set on one WebView instance affect the browser of the other WebView instance, such as the browser cache, domStorage?…

lannyf
- 9,865
- 12
- 70
- 152
2
votes
1 answer
Android 4.4.2 ( api level = 19 ) Webview Issue
We have a scenario where we are opening a URL in a webview in an android application .Issue is there are no pop-ups coming up like they come up in browser. Once the web page is loaded there is a button which when clicked gives popup coming at the…

Amit
- 41
- 1
- 5