机器人:可点击浮动图标在屏幕上?机器人、图标、屏幕上

2023-09-03 21:09:02 作者:谏书稀

有一个Android应用程序名为智能任务栏,它成功地引脚上的小图标半透明在屏幕上......图标保持在可见的所有该activites(包括主屏幕)。图标是可点击(/触摸式),而且它popopen一个小的弹出窗口,用户可以交互。

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.

我在如何做到这一点很感兴趣?我认为这件事情与 PopupWindow

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

任何想法?在此先感谢。

Any ideas? Thanks in Advance.

推荐答案

我最近尝试了这一点。

I recently experimented with this.

请参阅这个问题:creating系统覆盖(总在最前)在Android的按钮 - 该解决方案几乎是一样的,但你需要设置 TYPE_SYSTEM_ALERT 在布局PARAMS TYPE_SYSTEM_OVERLAY 。

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

 
精彩推荐
图片推荐