문제

I'm doing a Android LiveWallpaper with LibGDX and I want my application to start rendering below the notification bar, and not under it. In the picture: Left is what I get, right what I want. Any advice? Thanks problem

도움이 되었습니까?

해결책

You could use this: Height of Android statusbar

And simply draw under it. If you are using Worldunit based drawing (not Pixelbased) you can use this:

Gdx.gl.glViewport(x, statusbar.height, width, height);

To show you what this does look at this link: Keep aspect with black borders

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top