I search a way to put a view above the android notification bar like SwipePad
This is what i want (red scare) :
I have test this code :
setContentView(R.layout.main);
View disableStatusBar = new View(this);
disableStatusBar.setBackgroundColor(Color.GREEN);
WindowManager.LayoutParams handleParams = new WindowManager.LayoutParams(
WindowManager.LayoutParams.FILL_PARENT,
50,
// This allows the view to be displayed over the status bar
WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,//or other type_system make same
// this is to keep button presses going to the background window
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
// this is to enable the notification to recieve touch events
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
// Draws over status bar
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.TRANSLUCENT);
handleParams.gravity = Gravity.TOP;
getWindow().addContentView(disableStatusBar, handleParams);
But this only give me :
Green bar are not above notification bar...
Anyone can give me the good way ?