Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android LiveWallpaper: start rendering below notification bar

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

like image 918
zappp Avatar asked Sep 16 '26 13:09

zappp


1 Answers

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

like image 82
Robert P Avatar answered Sep 19 '26 18:09

Robert P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!