我想创建类似 更好的破解屏幕。
破裂的屏幕仍然是最重要的。
我不知道如何制作这种最重要的东西。
行为 :
例如,当显示破裂的屏幕时,如果我按主页按钮,它会显示主页,但破裂的屏幕保持原样(在主页顶部)..无论您移动到哪里都没关系..破裂的屏幕看起来完好无损..
到目前为止的搜索结果:
Google API 演示:半透明 GLSurfaceView< /a>
谁能指导我如何完成这项任务?或者有人可以给我提供一个示例代码吗?
I want to create something like Better Cracked Screen.
The cracked screen remains top of everything.
I am not able to get how to make such thing which resides top of everything.
Behavior :
For example when cracked screen is displayed, and if i press home button then it shows me the home but the cracked screen remains as it is(here on top of home).. doesnot matter whereever you move.. cracked screen appears intact..
Search Results so far :
Google API Demos : Translucent GLSurfaceView
Can anyone guide me how can i achieve this task ? Or can anyone please provide me a sample code for this ?
发布评论
评论(2)
使用 android.permission.SYSTEM_ALERT_WINDOW。
这将允许您创建一个放置在所有应用程序窗口之上的窗口。这里的一个关键见解是,您无法在视图级别上工作来解决此问题。视图层次结构是在窗口内绘制的,因此要将某些内容放置在所有窗口之上,您需要另一个窗口。
Use android.permission.SYSTEM_ALERT_WINDOW.
That will allow you to create a window that is placed on top of all application windows. A key insight to have here is that you can not work on a View level to solve this. A View hierarchy is drawn inside a window, so to place something on top of all windows, you need another window.
我猜它是一个 ImageView,作为 xml 文件的最后一部分创建(这意味着它位于堆栈顶部/所有其他元素之上)。并且此 ImageView 中的图像大部分是透明的,因此您可以看到其下面的元素
I would guess it is an ImageView that is created as the last part of your xml files (meaning it is on top of the stack/ above all other elements). And the Image in this ImageView is mostly transparent so that you see the elements below it