My Android application has to, at some point, switch to landscape mode with no enunciator bar to display a screen that takes up the full display hight and width. I do this by calling
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
and by calling "setFlags
" on the Window object passing in "WindowManager.LayoutParams.FLAG_FULLSCREEN
"
When I return to portrait mode and recover the enunciator bar using setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
and setting the flag "WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
" and "WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR
".
My layout object's origin (0,0) is now under the enunciator. So the first 15 or so pixels of my application view are covered over by the enunciator/cell signal/battery bar.
Has anyone else seen this problem?
Is there a flag that I'm missing that will recover portrait/non-fullscreen without pushing my application up into the top bar?