Code example for Window

Methods: addFlags, clearFlags

0
 
	@Override 
	public void lightsOut(Window w, View v, boolean dim) {
		super.lightsOut(w, v, dim);
		if (dim) {
			w.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
		} else { 
			w.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
		} 
	} 
}