webview

UWP Xbox One page navigation when using WebView

蓝咒 提交于 2020-01-15 10:03:44
问题 Usually when running a UWP app on Xbox the B button on the controller is handled automatically and will return you to the previous page. I have a page which contains a WebView, when you use the directional buttons to place the focus box around that control, the B button no longer responds. You can use the A button to take control of the WebView and display the pointer and the B button then will return focus back as above but I cannot navigate back using the B button until you move the focus

UWP Xbox One page navigation when using WebView

青春壹個敷衍的年華 提交于 2020-01-15 10:03:23
问题 Usually when running a UWP app on Xbox the B button on the controller is handled automatically and will return you to the previous page. I have a page which contains a WebView, when you use the directional buttons to place the focus box around that control, the B button no longer responds. You can use the A button to take control of the WebView and display the pointer and the B button then will return focus back as above but I cannot navigate back using the B button until you move the focus

setPluginsEnabled(true) and setPluginState(WebSettings.PluginState) deprecated, what should i do?

牧云@^-^@ 提交于 2020-01-15 09:17:32
问题 this code worked fine since I updated to API 19 and the method setPluginsEnabled(true) from the type WebSettings is now deprecated. I faced that the method setPluginState(PluginState.ON) would be a solution but it is deprecated too. What could i do? I found these posts A, B,C that some people had a similar issues, but those answers didnt help me :/ Although the compiler gives me a warning, it compiled successfully. (that's why its going to be deprecated, but it is not yet. Same happened with

Android JavascriptInterface problem

无人久伴 提交于 2020-01-15 09:11:40
问题 I am an Android beginner. I am trying to change a textview value in an activity in a webview javascript call to javascript interface class. There is a webview and a textview in the activity layout. MyWebActivity public class MyWebActivity extends Activity { ... public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String url = "http://myurl..."; webview = (WebView) findViewById(R.id.webview); webview.getSettings()

Android JavascriptInterface problem

送分小仙女□ 提交于 2020-01-15 09:10:11
问题 I am an Android beginner. I am trying to change a textview value in an activity in a webview javascript call to javascript interface class. There is a webview and a textview in the activity layout. MyWebActivity public class MyWebActivity extends Activity { ... public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String url = "http://myurl..."; webview = (WebView) findViewById(R.id.webview); webview.getSettings()

Android webView disable Wikipedia search bar

拥有回忆 提交于 2020-01-15 07:55:45
问题 I'm building an app which using webView and loading Wikipedia's web pages. I would like to disable this part: I don't know what is the best way to do this... I have thought of auto scrolling down, but then the user is able to scroll up. Auto scrolling down is also doesn't accurate and may hide some of the value's information. Thanks. 回答1: By looking into Wikipedia's source code you can see that the search bar is located inside a div container with the class name "header-container header

Android: How to open the webview in a new screen

大城市里の小女人 提交于 2020-01-15 07:47:09
问题 I've got four Image Buttons in screen1.xml. I've defined the webview in screen3.xml. If i click the ImageButton1 or other buttons, the repective URL (in webview) should load in screen3.xml. I tried to do this, but it throws forceclose error. But If I try the same this with webview defined in screen1.xml, it works. But the problem is the Image Buttons and the webview appears in the same page and they are overlapped which looks awful! Please help me out to open the webview in a new screen. BTW,

Can't figure out how to display javascript in Android webview

限于喜欢 提交于 2020-01-15 07:21:39
问题 I have this link: http://voap.weather.com/weather/oap/90210?template=GENXV&par=3000000007&unit=0&key=twciweatherwidget if you copy and paste it in your browser, it acts the same as it does in my webview, it is displaying document.write(" and "); around the widget. This is the code that that I am using in my Android app: WebView wv = new WebView(this); setContentView(wv); String html = "http://xhtml.weather.com/xhtml/hbhf/90210"; wv.loadUrl(html); The code above displays the coded url just

Android中使用WebView, WebChromeClient和WebViewClient加载网页

◇◆丶佛笑我妖孽 提交于 2020-01-15 06:33:19
在android应用中,有时要加载一个网页,如果能配上一个进度条就更好了,而android 中提供了其很好的支持,下面是一个例子程序,先帖: <?xml version=”1.0″ encoding=”utf-8″?><WebView xmlns:android=”http://schemas.android.com/apk/res/android”android:id=”@+id/webView” android:layout_width=”fill_parent”android:layout_height=”fill_parent” /> 主程序: Java代码 public class WebPageLoader extends Activity { final Activity activity = this ; @Override public void onCreate(Bundle savedInstanceState) { super .onCreate(savedInstanceState); this .getWindow().requestFeature(Window.FEATURE_PROGRESS); setContentView(R.layout.main); WebView webView = (WebView) findViewById(R.id

Android混合开发之WebView与Javascript交互

依然范特西╮ 提交于 2020-01-15 05:41:34
前言: 为了加快开发效率,目前公司一些功能使用H5开发,这里难免会用到Js与Java函数互相调用的问题,这个Android是提供了原生支持的,不过存在安全隐患,今天我们来学习一种安全方式来满足Js与java互相调用的需求。它就是WebViewJavascriptBridge。 学习动机: 先看下之前的解决办法: Android混合开发之WebView与Javascript交互 最近棒棒安全的一个市场推广来我们公司推广他们的产品,当时也没太引起我的注意,后来这个市场推广人员把我们的app的进行了他们的安全验证,然后发给我一份检测报告,关于WebView的检测内容大致如下: 其实目前公司采用H5的业务都是相对不是很重要的一些业务,而且安全性要求相对比较低,不过作为技术负责人的我,觉得现在很有必要尽快寻找一个相对安全的方式来解决这个问题,算是未雨绸缪吧。经过搜过资料寻找的解决办法就是使用WebViewJavascriptBridge来实现Js与Java的互相调用。 WebViewJavascriptBridge介绍: WebViewJavascriptBridge是WebView和Js交互通信的桥梁,用作者的话来说就是实现java和js的互相调用的桥梁。替代了WebView的自带的JavascriptInterface的接口,使得开发者更方便的让js和native灵活交互