android-webview

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,

Loading HTML5/js into WebView fails on Nexus7 running KitKat, but ok on phone running Gingerbread

余生颓废 提交于 2020-01-15 07:04:16
问题 I need to load an HTML5 / Javascript game into a WebView. Since this works on an old phone running Gingerbread but fails on a Nexus7 running KitKat, I'm guessing maybe it's something to do with the new Chromium based WebView in Android 4.4? The game works fine in the Chrome Browser on the Nexus7, but not in the WebView in my app. Any advice where I should be looking to track down the source of this problem would be greatly appreciated. The LogCat when I run on the Nexus7 is: 05-29 13:49:46

Input Text Field hidden below keyboard in Android webview

此生再无相见时 提交于 2020-01-14 12:41:26
问题 I implement Webview in my app in Fragment but in Webview EditText Field Hide when the keyboard appears. I Set WindowSoftInputMode = SoftInput.StateHidden | SoftInput.AdjustResize and android:fitsSystemWindows="true" but not working for me. I also use custom RelativeLayout but it's not working. Please help me to solve this issue. My Code is below in Fragment <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout

Input Text Field hidden below keyboard in Android webview

我与影子孤独终老i 提交于 2020-01-14 12:41:22
问题 I implement Webview in my app in Fragment but in Webview EditText Field Hide when the keyboard appears. I Set WindowSoftInputMode = SoftInput.StateHidden | SoftInput.AdjustResize and android:fitsSystemWindows="true" but not working for me. I also use custom RelativeLayout but it's not working. Please help me to solve this issue. My Code is below in Fragment <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout

How to call a JavaScript function from java code android native

纵然是瞬间 提交于 2020-01-14 05:40:29
问题 I need to load a HTML file which internally has some AJAX service calls. I need to call a function in that HTML file from Java code. I can see the data loading in web but not in Emulator. My HTML file is below <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, user-scalable=yes"> <link class="include" rel="stylesheet" type="text/css" href="./jquery.jqplot.min.css" /> <link type="text/css" rel="stylesheet" href="syntaxhighlighter/styles/shCoreDefault.min.css" />

Android webview( webkit.CookieManager) neglecting cookie attributes like ;expires

拈花ヽ惹草 提交于 2020-01-14 05:24:48
问题 Set-Cookie: oauth=xyz; domain=tyxbv; path=/; expires=Tue, 27-Oct-2020 17:16:00 GMT; secure; HttpOnly This is the cookie which i am getting from server when my webivew hits the url. But when I try to get the cookie details from the webview using getCookie("url which sets the cookie") i get oauth = xyz The other cookie attributes are not stored in the cookie store. I am unable to solve the above. I need other attributes also like path, expires. etc I am setting accept third party cookies true

Android: WebView onClick not work?

余生颓废 提交于 2020-01-14 04:46:46
问题 I going to hide and show the Layout onclick of the webview. I have code like below: @Override public void onClick(View v) { switch(v.getId()){ case R.id.backButton: finish(); break; case R.id.webView: if(bottomShow){ bottomLayout.setVisibility(View.GONE); bottomShow = false; } else{ bottomLayout.setVisibility(View.VISIBLE); bottomShow = true; } break; } } I have also set the clickListener as like webView.setOnClickListener(this); but even after doing that i am not getting any effect. Why i am

Android: WebView onClick not work?

南楼画角 提交于 2020-01-14 04:46:09
问题 I going to hide and show the Layout onclick of the webview. I have code like below: @Override public void onClick(View v) { switch(v.getId()){ case R.id.backButton: finish(); break; case R.id.webView: if(bottomShow){ bottomLayout.setVisibility(View.GONE); bottomShow = false; } else{ bottomLayout.setVisibility(View.VISIBLE); bottomShow = true; } break; } } I have also set the clickListener as like webView.setOnClickListener(this); but even after doing that i am not getting any effect. Why i am

android webview: prevent text selection actionMode actionBar

你离开我真会死。 提交于 2020-01-12 18:43:39
问题 I want to preserve the text selection in a webView while preventing any contextual menu of the actioMode from being shown. Neither the new floating one nor the old actionBar, just the selection handles and of course the selection behaviour. Hooking to the actionModeCallback in startActionMode allows me to clear all items in the menu in the callback onCreateActionMode. This works fine on android 6, since an empty floating menu won't show at all, and the actionMode text selection behaviour is

Android webview custom error page

老子叫甜甜 提交于 2020-01-12 03:31:13
问题 I am creating application that use WebView to access a online website. I am stuck where I have to add code to check availability of page. public class SpartanWeb extends Activity { WebView mWebView; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Adds Progrss bar Support this.getWindow().requestFeature(Window.FEATURE_PROGRESS); setContentView(R.layout.main); // Makes Progress bar Visible