views:

152

answers:

2
+2  Q: 

Android Web View

I am curious if there is a way from within a WebView when a button is clicked it display a new view on top of the current display.

I have a web site and when the user clicks the signature field I want to be able to capture the signature on the device. From the best I can tell the easiest way is to write this section in the Android SDK. I'm trying to avoid rewriting the entire website.

Any help is greatly appreciated.

+2  A: 

Look into addJavaScript interface. Looks like you can call a javaobject via javascript. So you could put some javascript behind a button onclick handler that could call some java that would display a dialog with the second webview.

BrennaSoft
thanks, I discovered this approach the other day and meant to update the question with how I approached the problem.
dbslone
+1  A: 

Alternatively, you could create an intent that your activity with the webview responds to. This is easier than you'd think:

For a recent Twitter implementation, there was a callback from twitter so that the browser navigates to myapp:myintent. In the android manifest, you declare an activity handles myapp:intent. When that url is navigated to, it launches your activity via the OnNewIntent event in which you can show your new view on top.

Hope this helps.

TreeUK