I have some code (android source), and Im trying to set Opacity of a LayoutParam
First, I've got this
mLayoutParams = new WindowManager.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
height,
WindowManager.LayoutParams.TYPE_STATUS_BAR,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
// Setup statusbar transparency preference
mOpacity != 100 ? PixelFormat.TRANSPARENT : PixelFormat.RGB_565);
Then I register a SettingsObserver, for reloading mOpacity, but if I set Opacity back to 100, it wont be RGB_565
, as LayoutParams
have defined TRANSPARENT
Format. I'd like to know if there is some way for setting up this standalone, because If I add to obsever the whole code, it ends up into creating infinite Layouts
, and overlaying them. Another useful thing would be how to destroy mLayoutParams before creating a new One.
Thanks in Advance.