Android : Floating Clickable Icon over Screen?

筅森魡賤 提交于 2019-12-17 17:34:51

问题


There's an Android Application called Smart Taskbar that manages to Pin a small SemiTransparent Icon over the screen...The icon remains visible over ALL the activites (including the home screen). The Icon is Clickable (/Touchable), and it does popopen a Small Popup window which the user can interact with.

I'm very interested in how this is done? I think it's something to with PopupWindow.

Any ideas? Thanks in Advance.


回答1:


I recently experimented with this.

See this question: Creating a system overlay window (always on top) - the solution is virtually the same, but you need to set TYPE_SYSTEM_ALERT in the layout params instead of TYPE_SYSTEM_OVERLAY.




回答2:


Late but here is a complete tutorial which demonstrates the whole scene https://droidqd.wordpress.com/2015/01/07/how-to-make-a-floating-face-bubble-on-home-screen-in-android/




回答3:


Try this open source project, which worked for me Android chat head



来源:https://stackoverflow.com/questions/3732935/android-floating-clickable-icon-over-screen

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