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开发者_Go百科.
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 ?
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.
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
精彩评论