Draw bitmaps on top of the navigation bar on Android

In my application, I need to draw a bitmap on top of all running applications. I created a view that is invisible and overlays on top of all applications. with this kind of overlay, I can draw bitmaps at a given position, but I cannot draw a bitmap on top of the navigation bar. I used the following layout options.

    WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
    WindowManager.LayoutParams.FLAG_FULLSCREEN
    |WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
    |WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
    |WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR 
    |WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,

I need help solving this problem. thanks in advance

+3
source share
1 answer

, , Y windowManager.Layout, .

w = new android.view.WindowManager.LayoutParams(-1, -1,0,-navigationBarHeight(),    WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
    WindowManager.LayoutParams.FLAG_FULLSCREEN
    |WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
    |WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
    |WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR 
    |WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, Pixel.Translucent);
    f.addView(v, w);

: , .

+4

All Articles