Tag: webview

Enable longClick in WebView

In the browser, you can longClick on URLs. In my WebView, you cannot. How can I make it so you can?

Loading package html + resources into webview

I would like to know how I can display a HTML page in webview with references to relative/local images. The goal is to have the html page and all linked images contained in the android application package itself. Where would I need to place the assets (assets directory?) and how do I reference these so […]

Open link from Android Webview in normal browser as popup

So what I have is basicly a simple webview wich loads a page. This page has a few links that opens within the webview. That’s what it supposed to do, so it’s working all fine. But there is one single link from that page wich should load as a popup, so I want it to […]

Android get height of webview content once rendered

I’m trying to get the height of a webview once it has been rendered. It always returns null, I’ve tried getHeight, getMeasuredHeight, getContentHeight and it always returns null. Layout: <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:id=”@+id/instructions” android:background=”@color/transparent_black” > <WebView android:id=”@+id/top_content” android:layout_width=”match_parent” android:layout_height=”wrap_content” /> </RelativeLayout> Activity public class TestActivity extends MenuActivity { private final static […]

Error inflating class android.webkit.WebView happens sporadically in production

my application is on Google Play and it runs fine on most of devices (thousands of users). But in rare cases (fraction of percent of daily active users) I get Error inflating class android.webkit.WebView when I inflate layout for my fragment in onCreateView method. Full stack trace is following: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tapmedia.tapito/com.tapmedia.tapito.LockscreenActivity}: […]

Android PhoneGap Plugin, UI tabbar, resize WebView

I am creating a tasty PhoneGap plugin that hopefully will be opened up once it is ready.. The plugin is mostly finished, I just need a nice UI for user interaction. In a nutshell I want to create a “native” android toolbar component. Much how you would if you implement the PhoneGap UIControls Tabbar library […]

How to detect a swipe gesture on webview

i’m developing a simple android application with a RelativeLayout and a WebView inside. I have to detect swipe from bottom to top done only in the 20% of the left part of the screen. So when user swipe in that space from bottom to top i have to show a custom dialog. What i try […]

Loading local html file in webView android

I have to load an existing html file into a WebView that is located at this path in the file system: /data/data/com.example.example/files/file.html But, when the WebView loads it, I don’t see anything. Who can help me? WebView code (assuming path is the path I’ve written above): WebView webView = (WebView)findViewById(R.id.webView1); File htmlFile = new File(path); […]

android webview with client certificate

I tried for days to use a web view with a client certificate embedded in the application, but it seems to me that the android sdk does not provide any way to do it, is there a callback to intercept the challenge sent by the server? is there a way to use webview with a […]

Is there anyway to remove an onTouchListener from a view object?

I have an on touch listener for a webview, but it has a bad effect on the functionality of the webview, so I am wondering if there is anyway to removed the on touch listener after the initial interaction?

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