How does the Gmail Android app do the webview-header-overlay magic for the mail-conversation view?

安稳与你 提交于 2019-12-03 03:59:17

Incidentally, the only approach I can think of is javascript-based - use javascript in the WebView to gather the header coordinates, and then use WebView.addJavascriptInterface() to pass those coordinates on to Java and the HybridConversationScrollContainer. I haven't tried doing this myself though so I'm not sure if it could actually work.

There is a short post on the android Developer blog talking about the addJavascriptInterface() method:

http://android-developers.blogspot.com/2008/09/using-webviews.html

It would be wonderful if MessageHeaderScrollView could be released as an open-source library - I'd use it! - but seeing as the Gmail app is closed, it doesn't seem immediately likely.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!