gpt4 book ai didi

android - ICS 中的全屏覆盖

转载 作者:太空狗 更新时间:2023-10-29 14:29:49 26 4
gpt4 key购买 nike

我有一个覆盖状态栏的全屏程序,这样你可以看到它但不能点击它(就像锁屏一样)。当我在 Ice Cream Sandwich 中运行我的程序时,我的应用程序会下降到状态栏下方(允许触摸)。我怎样才能让它在 ICS 中再次工作?

我使用以下代码:

final WindowManager.LayoutParams mOverLayParams = new WindowManager.LayoutParams(
WindowManager.LayoutParams.FILL_PARENT,
WindowManager.LayoutParams.FILL_PARENT,
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.TRANSLUCENT);

最佳答案

我知道唯一的解决方案是将 TYPE_SYSTEM_ALERT 替换为 TYPE_SYSTEM_OVERLAY。但是这样你的窗口将不会接收到触摸事件。

关于android - ICS 中的全屏覆盖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8101765/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com