Android上的浮动应用程序(窗口化应用程序) [英] Floating app on Android (Windowed app)

查看:78
本文介绍了Android上的浮动应用程序(窗口化应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道我如何创建浮动窗口吗?(下图显示了我的意思)-

创建系统覆盖窗口(始终在顶部)

Does anyone know how I can create a floating window? (Image below shows what I mean) - source code

I've read on various websites that in order to do so an app must be running as a service which should in turn be running as an activity using 'TYPE_SYSTEM_ALERT'.

If the above is or isn't true ... I still don't know how to implement the code. Can someone write some code showing how a simple app (click button and do something) can be made into a floating window, Thank You :)

This may also help - facebook chatheads

解决方案

These q&a's (linked below) where helpful for achieving what i wanted:

Possible to inflate an XML layout in a Service? (Android)

Creating a system overlay window (always on top)

这篇关于Android上的浮动应用程序(窗口化应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆