开发者

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 rewr开发者_Go百科iting the entire website.

Any help is greatly appreciated.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜