android-webview

Android webview screenshot white border

女生的网名这么多〃 提交于 2020-01-05 19:31:25
问题 i followed this link to screenshot my webview completely. It works fine. But I have an issue. The screenhot that I get from the webview contains white spaces on the top and bottom of the picture? How do I get rid of this? Kindly let me know. This is the code that I've used for capturing from webview. IF YOU LOOK PROPERLY THERE IS WHITESPACE BOTH AT THE BOTTOM AND TOP PARTS OF THE IMAGE. public static String saveCapturedImageToSdCard() { Picture picture = WebViewActivity.sWebViewEx

Android webview screenshot white border

穿精又带淫゛_ 提交于 2020-01-05 19:30:29
问题 i followed this link to screenshot my webview completely. It works fine. But I have an issue. The screenhot that I get from the webview contains white spaces on the top and bottom of the picture? How do I get rid of this? Kindly let me know. This is the code that I've used for capturing from webview. IF YOU LOOK PROPERLY THERE IS WHITESPACE BOTH AT THE BOTTOM AND TOP PARTS OF THE IMAGE. public static String saveCapturedImageToSdCard() { Picture picture = WebViewActivity.sWebViewEx

Getting result back of webview operation

狂风中的少年 提交于 2020-01-05 12:14:45
问题 I am implementing payment functionality in my application. For that, I am launching my website's payment page with new intent (startActivityForResult) on a click of a button from my application. Once the payment is succeed, I want that webview to be closed automatically and should get succeed of failed result back in calling activity. Is it possible and if yes, how can I achieve this? 回答1: I am not completely aware of your use case. If are are just trying to accept credit cards or accept

Android WebView shows blank screen

╄→гoц情女王★ 提交于 2020-01-05 08:32:20
问题 I'm trying to create a WebView app that shows a meteor web app using Tiago Scolari's sample. When i load the apk in my phone i see the background changes but the log in button doesn't show. Anyone has a clue how to make this work? --Edit: Adding - webSettings.setJavaScriptCanOpenWindowsAutomatically(true); webSettings.setDomStorageEnabled(true); - shows me the log in button and gets me to the facebook log in. After logging in using facebook i'm presented with a white screen. Any more advice?

Webview does NOT finish loading

£可爱£侵袭症+ 提交于 2020-01-05 07:57:44
问题 If I use a button it works, but it redirects to a default browser. I want to use the webview because i want to display the website in my webview and avoid the address bar to display. Here is my code: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main1); WebView webview = (WebView) findViewById(R.id.webView1); webview.loadUrl("http://docs.google.com/gview?embedded

Android Web View to Android Java Activity Class

孤街浪徒 提交于 2020-01-05 07:16:19
问题 is it possible to make a html button that when I click, it will go to my android activity class. Just like using Intent when I view Activity to another Activity anyone have a thoughts? my JsInteface class change into this public class JavaScriptInterface { Context mContext; /** Instantiate the interface and set the context */ JavaScriptInterface(Context c) { mContext = c; } /** Show a toast from the web page */ public void showToast(String toast) { Intent mainIntent = new Intent(mContext,

How to pass Firebase Auth token to webView and register for notifications on Android

我怕爱的太早我们不能终老 提交于 2020-01-05 06:55:08
问题 I have a Firebase WebApp which provides info to a user. In addition to the app I need to send push notifications via Firebase Cloud Messaging to users with an Android App. Goal: The user should have one login to the app which both registers them for notifications and loads the WebApp through a WebView. Problem: I can't find an approach which achieves this with a single login. In every case I need to login once for the native app and then once again through the webView. First, some references

Android video view creates a black screen after the video

家住魔仙堡 提交于 2020-01-05 05:08:12
问题 I'm using Android's VideoView for playing locally stored mp4 videos. My app is a hybrid app, i.e. a webview based app, and i'm using native code to play videos. The video plays in the same activity as that of the webview. I'm facing an issue only with Android version 4.0.X. Before starting the video i toggle the visibility of webview and videoview so that webview is invisible and videoview is visible. After the video is over, i reverse this. I still see a black screen over the webview whose

goBack() in WebView goes back ALMOST all the way

旧时模样 提交于 2020-01-05 04:40:32
问题 (EDIT: Maybe I should rephrase the title, but it still describes the behavior correctly. Sometimes when you goBack() to the first URL it loads, and sometimes it doesn't. Even if I do it with loadURL() in onResume! See the code I appended to the Activity at the bottom of the question.) The back button override works well and goes back through the pages I've visited. Until it should go back to the start URL which loads fine from onCreate. Then I get a small delay and a blank page, instead of

Outer element margin not equal to inner element margin

孤者浪人 提交于 2020-01-05 02:35:08
问题 I am using an Android WebView to display my app's HTML content. I need to dynamically find the full height of an element (usually a div) including padding, margin, and border. I am using JavaScript, and cannot use jQuery. I have been using scrollHeight on my div to get the height. I got the computed style of the div using var style = window.getComputedStyle(DIV, null); and got the top and bottom margin by calling style.marginTop and style.marginBottom . They were both 0px. The problem is that