Android:屏幕上的浮动可点击图标?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3732935/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android : Floating Clickable Icon over Screen?
提问by st0le
There's an Android Application called Smart Taskbar
that manages to Pin a small SemiTransparent Icon over the screen...The icon remains visible over ALLthe activites (including the home screen). The Icon is Clickable (/Touchable), and it does popopen a Small Popup window which the user can interact with.
有一个名为的 Android 应用程序Smart Taskbar
可以在屏幕上固定一个小的半透明图标......该图标在所有活动(包括主屏幕)上保持可见。图标是可点击的(/可触摸),它确实弹出一个用户可以与之交互的小弹出窗口。
I'm very interested in how this is done? I think it's something to with PopupWindow
.
我对这是如何做到的很感兴趣?我认为这与PopupWindow
.
Any ideas? Thanks in Advance.
有任何想法吗?提前致谢。
采纳答案by Adam Wo?
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
.
看到这个问题:Creating a system overlay window (always on top)- 解决方案几乎是一样的,但你需要TYPE_SYSTEM_ALERT
在布局参数中设置而不是TYPE_SYSTEM_OVERLAY
.
回答by QAMAR
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/
迟到但这里是一个完整的教程,它演示了整个场景 https://droidqd.wordpress.com/2015/01/07/how-to-make-a-floating-face-bubble-on-home-screen-in-安卓/
回答by murali krish
Try this open source project, which worked for me Android chat head
试试这个开源项目,它对我 有用 Android 聊天头