View moves downwards after standby
I noticed that when my app is onscreen and the device goes into standby (black screen) and the device gets out of the standby the View (layout) will be moved a couple of centimeter downwards so t开发者_C百科hat the last couple of centimeters of the View actually will "fall offscreen".. The Activity itself is declared as being
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
After some more in-depth research, or actually just looking at it, I noticed that the amount of movement (the height of it) actually looks a lot like the height that the statusnoticebar should take. Anyone ever experienced this and/or anyone got a solution for it ? Also how should I force a redraw of the whole screen when it comes out of the standby mode ? I tried placing a MainLayout.ForceLayout() in the onResume() method but that didnt work at all :(
I'm experiencing the same issue. I have the same theme set with the same shift occurring. Do you have any update on the cause?
EDIT:
After some more searching I found a solution to this issue. Turns out this is a known bug, but a workaround is to include this line in your onCreate method.
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
精彩评论