webview

Android Javascript WebView

冷暖自知 提交于 2020-01-24 06:42:59
问题 I have an app where my min API is 16, and I want to evaluate some javascript on a web view and when I have mWebView.evaluateJavascript("(function()...)"); I get a compile error saying this is only available in API 19 and higher, so how can I evaluate javascript in a web view for the API below 19, I have but above code in a if statement for API 19 and above, but how can I do this in API below 19? Thanks for the help 回答1: Before API 19, you have to use WebView.loadUrl() with the javaScript

Android Javascript WebView

回眸只為那壹抹淺笑 提交于 2020-01-24 06:42:05
问题 I have an app where my min API is 16, and I want to evaluate some javascript on a web view and when I have mWebView.evaluateJavascript("(function()...)"); I get a compile error saying this is only available in API 19 and higher, so how can I evaluate javascript in a web view for the API below 19, I have but above code in a if statement for API 19 and above, but how can I do this in API below 19? Thanks for the help 回答1: Before API 19, you have to use WebView.loadUrl() with the javaScript

sweep down to refresh WebView app in flutter

让人想犯罪 __ 提交于 2020-01-24 01:15:09
问题 I have created a flutter app with WebView Is there any way to sweep down to refresh the webpage I am using "webview_flutter_plugin" plugin @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Stack( children: <Widget>[ Container( child: Center( child: Text(_title), ), ), ], )), body: SafeArea( child: WebView( key: _key, javascriptMode: JavascriptMode.unrestricted, initialUrl: _url)), ); } } 回答1: SwipeDetectore did it. in pubspec.yaml : dependencies: flutter:

Facebook MultiLogin in Android Webview

早过忘川 提交于 2020-01-23 22:45:28
问题 I have an embedded webview in my app. I have to show Facebook's new MultiLogin at one point during which the popup like window which appears when trying to login does not appear. The facebook login opens up in a new window. Once I successfully login, I'm taken to a blank window. How do I overcome this? Even the cancel button in the login page does not do anything. If I open this url in Android's basic browser, the popup appears perfectly fine and everything works as intended. The Multilogin

Unable to implement Visualization:Geomap in android webview

允我心安 提交于 2020-01-23 21:07:06
问题 I am trying to implement Visualization: Geomap in android Webview. For Visualization:Geomap, I refer developers.google.com /chart/interactive/docs/gallery/geomap Here I have implemented first example to show regions on map. In android webview when I touch on specific region it shows the popup with country name, as I touch outside region of map it shows the same popup. ISSUE: In android webview , popup doesn’t disappear when I touch outside Google map. It should work similarly as on desktop

WebView Links not opening

一世执手 提交于 2020-01-23 12:11:53
问题 I am trying to open a link using Webview in Android. There are some links embedded into WebView. My problem is webview is not opening any link that does not starts with www. For ex, www.google.com is working but maps.google.com is not.I have also tried to override WebViewClient but it didn't work. One thing I noticed is by putting Toast to see what url is being called in WebViewClient. It showed perfect for www.google.com but returned nothing for other links. I thing WebViewClient is not

WebView Links not opening

穿精又带淫゛_ 提交于 2020-01-23 12:11:34
问题 I am trying to open a link using Webview in Android. There are some links embedded into WebView. My problem is webview is not opening any link that does not starts with www. For ex, www.google.com is working but maps.google.com is not.I have also tried to override WebViewClient but it didn't work. One thing I noticed is by putting Toast to see what url is being called in WebViewClient. It showed perfect for www.google.com but returned nothing for other links. I thing WebViewClient is not

Android Webview loading dialog not being dismissed

给你一囗甜甜゛ 提交于 2020-01-23 07:07:25
问题 I am using the following code class CustomWebViewClient extends WebViewClient { Context context; ProgressDialog pd = null; public CustomWebViewClient (Context c){ context = c; } public void onPageFinished(WebView view, String url){ pd.dismiss(); } public boolean shouldOverrideUrlLoading(final WebView view, final String url) { pd = ProgressDialog.show(context, "", "pageload. Please wait...", true); view.loadUrl(url); return true; } } When I click a link in the WebView, the dialog appears and

WebView Text Zoom Issue in Android

孤者浪人 提交于 2020-01-23 05:49:13
问题 I have a document reader project in android. Main Activity includes a WebView. The texts are reading from html. In Top Options menu includes a button for increasing text size dynamically (text are wrapping). So far so clear but when the button pressed, the text size is some increases but all text are shifting down in screen and twice wehen pressing the button, the text size increases and all text shifting down a little more again. This situation is really happening frustrating for readers.

How do I see request headers on Android WebView requests?

一笑奈何 提交于 2020-01-23 04:58:04
问题 How can I intercept all requests made out of an Android WebView and get the corresponding request headers? I want to see the headers for every request made from my WebView including XHRs, script sources, css, etc. The equivalent on iOS is to override NSURLCache which will give you all this information. The following are probably the closest to what I want but as far as I can see WebViewClient only ever gives us back strings: void onLoadResource(WebView view, String url); WebResourceResponse