Tag: webview

Android activity as dialog, but without a title bar

I have an activity that has the following set as theme: android:theme=”@android:style/Theme.Dialog” However, there is a title bar in the activity-dialog that appears, that uses up the little available space that I have. How can I remove it?

Tapping form field in WebView does not show soft keyboard

I created my own WebView and set the WebChromeClient and WebViewClient objects. When I start this WebView, the HTML form fields react when I touch them (a cursor appears), but they do not get selected, nor does the soft keyboard start. If I use the trackball to choose the form and press it, the keyboard […]

how to display progress while loading a url to webview in android?

I am loading url into webview: WebView webview=(WebView)findViewById(R.id.webview); webview.loadUrl(url); It’s taking some time to load url, during which it shows a blank screen. I want to display a progress dialog while the url is loading: ProgressDialog dialog = ProgressDialog.show(this, “HI”,”Loading……”, true); However, the above is code is not working. If any have any ideas, please […]

How to stop youtube video playing in Android webview?

How can I stop a YouTube video which is played in my webview? When I click on the back button the video doesn’t stop and instead continues in the background. Code: webView = (WebView) findViewById(R.id.webview); webView.getSettings().setPluginsEnabled(true); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setBuiltInZoomControls(false); webView.getSettings().setSupportZoom(false); webView.loadData(myUrl,”text/html”, “utf-8”);

How to change font face of Webview in Android?

I want change the default font of webview to a custom font. I’m using webview in developing an bilingual browser app for Android. I tried getting an instance of custom typeface by placing my custom font in assets. But still couldn’t set webview’s default font to my font. This is what I tried: Typeface font […]

Make Android WebView not store cookies or passwords

I use an Android WebView for Twitter OAuth: Twitter asks the user to log in and authorize the application, I retrieve the access token and persist it in my application. I have no need (and do not) store the user password, but the WebView keeps Twitter’s cookies around, and it also asks the user if […]

Are WebViewClient and WebChromeClient mutually exclusive?

From this great explanation about the differences between WebViewClient and WebChromeClient it seems that if you use one, you shouldn’t be using the other (for the same WebView object). Is my understanding correct? If not, when would one use both WebViewClient and WebChromeClient for the same WebView object? Is there an example of a situation […]

What do setUseWideViewPort() and setLoadWithOverviewMode() precisely do?

I am disappointed at the lack of documentation of WebView and related stuff. (unless you think the following is propert documetation) public void setLoadWithOverviewMode (boolean overview) Set whether the WebView loads a page with overview mode and: public synchronized void setUseWideViewPort (boolean use) Tell the WebView to use the wide viewport So: What is “Overview […]

How can I display a pdf document into a Webview?

I want to display pdf contents on webview. Here is my code: WebView webview = new WebView(this); setContentView(webview); webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl(“http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf”); I am getting a blank screen. I have set internet permission also.

How to force keyboard with numbers in mobile website in Android

I have a mobile website and it has some HTML input elements in it, like this: <input type=”text” name=”txtAccessoryCost” size=”6″ /> I have embedded the site into a WebView for possible Android 2.1 consumption, so that it will also be an Android application. Is it possible to get the keyboard with numbers instead of the […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.