webview

onLongClickListener does not work on WebView

孤街浪徒 提交于 2020-01-03 17:39:33
问题 I have the following struktur to implement an longclicklistener. It works if I click on a text on the webview which contains a html-link, so I know the structure is not completely wrong. I removed this link now and the listener just doesn't listen to clicks anymore. Does anybody know this problem and have some advices? private View.OnLongClickListener mLongClickHandler = new View.OnLongClickListener() { @Override public boolean onLongClick(View view) { ... return true; } }; ... mywebview

Listen Webview Key Events from software keyboard in Android Activity

我们两清 提交于 2020-01-03 15:34:28
问题 Is it possible to handle software keyboard events from a webview in a host Android application? For example, can my application's Activity listen the typed content in the search field of a webview displaying Google website? Considering the method described below this would be possible if I overwrite it returning true, but unfortunatelly I was not able to do it. Any ideas? public boolean shouldOverrideKeyEvent (WebView view, KeyEvent event) Added in API level 1 Give the host application a

React Native WebView Loading Error Handling

牧云@^-^@ 提交于 2020-01-03 15:22:11
问题 When the webview loads an invalid url, which property should I set to display an error view? I try renderError, it triggers the console message but did not display the view. here's the code: <View style={styles.webview_body}> <WebView source={{uri:this.props.url}} onNavigationStateChange={this.onNavigationStateChange.bind(this)} renderError={this.loadError.bind(this)} /> </View> //the fucntion which display the error message loadError(){ console.log('loaded'); return ( <View> <Text> something

Web page not Avaible Go another class or show an image

天大地大妈咪最大 提交于 2020-01-03 05:37:07
问题 1-)i have a webview project.sometimes im forgot my internet connect.and its showing webpage not available.when if this be i want to go another class or show error.xml its so bad displaying. thanks all. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.webplayer); customViewContainer = (FrameLayout) findViewById(R.id.customViewContainer); webView = (WebView) findViewById(R.id.webView); AdView adView = (AdView) this.findViewById(R.id

NativeScript 3.4: WebView on iOS performance is Slow

≡放荡痞女 提交于 2020-01-03 04:54:15
问题 When I open an site in the WebView on NativeScript 3.4 & 4.0 the performance of the JavaScript is slow. Much much slower then normal WKWebView when build in Xcode. I have also tried the NativeScript playground (play.nativescript.org) and if you place out an WebView an run an some site with JavaScript it also have slow performance. Please help me 回答1: Se this: github. The issue might be related to the JavaScript which is set up to config the site's initial-scale.Just for the test I would

Loading javascript functions to webview in Android Kitkat

☆樱花仙子☆ 提交于 2020-01-03 03:23:06
问题 I am having problems with loading javascript functions, which are in external file, into webview in Android Kitkat. My approach for earlier versions was that i implemented my own webview client and in method onPageFinisned i called mWebView.loadUrl("javascript:" + functions); later, when i wanted to call some js method, i call same code, like mWebView.loadUrl("javascript:" + someFunction); In android kitkat there is new method evaluateJavascript, which replaces my code with calling that

how to play video in android webview?

∥☆過路亽.° 提交于 2020-01-03 03:01:27
问题 I want to put a web into webview.These is a video in the web.The video's format is wmv.I put the web in the android project "assets" file.Now I can scan the web,but the video can't play.This is the code on below.Who can help me?Thanks. public class WebViewActivity extends Activity { private WebView webview; private WebSettings webSettings; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); webview = (WebView)

gridview with webview android

天大地大妈咪最大 提交于 2020-01-03 02:30:09
问题 i have a problem with gridview and webview, Im a junior development. I have 3 Activities. the first have a splashScreenActivity that Loads the application startup. the second is an activity that load a gridview gridView gridview = (GridView) findViewById(R.id.gridview); gridview.setAdapter(new ImageAdapter(this)); gridview.setOnItemClickListener(new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, long id) { String urlP; switch (position

WebView.loadUrl(url) does nothing

两盒软妹~` 提交于 2020-01-02 10:00:43
问题 I recently wrote up a simple Twitter app for Android to learn the ropes of the Twitter API and OAuth. The app's main activity simply asks for a username to follow. It then calls another activity which handles the OAuth & Twitter API calls. It redirects the user to an authorization page, which then returns to the app after the user finishes. It used to work just fine, but now for some reason when I call webview.loadUrl(authorizationURL), NOTHING happens. I never changed anything that would

WebView.loadUrl(url) does nothing

五迷三道 提交于 2020-01-02 09:58:54
问题 I recently wrote up a simple Twitter app for Android to learn the ropes of the Twitter API and OAuth. The app's main activity simply asks for a username to follow. It then calls another activity which handles the OAuth & Twitter API calls. It redirects the user to an authorization page, which then returns to the app after the user finishes. It used to work just fine, but now for some reason when I call webview.loadUrl(authorizationURL), NOTHING happens. I never changed anything that would