Skip to content Skip to sidebar Skip to footer

Libgdx Viewport Android Devices

How can i use the fitviewport or viewport? i need to fit the screen to many android devices as posible. I dont have idea how to use that, thank you for your help, if you can paste

Solution 1:

Some code

https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/ViewportTest1.java

https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/ViewportTest2.java

https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/ViewportTest3.java

And the documentation https://github.com/libgdx/libgdx/wiki/Viewports

Run the tests and you will understand the way it works.

Post a Comment for "Libgdx Viewport Android Devices"