-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app外悬浮窗如何覆盖状态栏讨论 #12
Comments
可以看看这个项目 https://github.com/zzz40500/HeadsUp |
好,有空了看看~ On Mon, Mar 28, 2016 at 1:11 PM, 咕咚 notifications@github.com wrote:
|
https://github.com/zzz40500/HeadsUp |
如果是 6.0 以上的系统,可以通过申请权限,获取一个 可以让应用悬浮在其他应用之上的权限,参考 http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2016/0118/3882.html 看这个能不能解决你的问题 |
但是,这样子6-的机型,就无法实现好像qq微信那有提示消息了。不知道有没有大神做过啊。最近几天一直在找这个东西 |
WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; |
从参考1里的尝试情况
可以看到这个TOAST的type是不能改的.要改申请权限,如果申请权限,就不用通过这种方式绕过了,
根据官方说明
type: 值低的窗口在值高的下层,相同的 type值,后创建的窗口显示在先创建的窗口上面.
但是状态栏是2000
TYPE_TOAST 是 2005
然后就是可能修改FLAG了.
我自己根据官方文档.测试了几个比较可能的.比如
FLAG_FULLSCREEN 等.当时这个值的时候,会被状态栏遮挡部分,但是无法显示在状态栏之上.( ,说法好像有冲突..按理说应该是在上面的.因为值更高.也可能是因为这个值只能在本app内使用.)
暂无思路..
The text was updated successfully, but these errors were encountered: