dbslone
dbslone

Reputation: 2034

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.

Upvotes: 2

Views: 667

Answers (2)

Tristan Warner-Smith
Tristan Warner-Smith

Reputation: 9771

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.

Upvotes: 1

Robby Pond
Robby Pond

Reputation: 73484

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.

Upvotes: 4

Related Questions