I have not found any way to successfully set a screen resolution on my android device.
when i run my libgdx app on my galaxy note, it automatically sets the applications screen resolution to 800×600 while my phone (Galaxy note) got a 1280×800 resolution. there are no scaling. just a small screen with huge black boarders around.
I have tried to use Gdx.graphics.setDisplayMode to force a greater resolution but without any success.
my application is very simple. i followed:
http://code.google.com/p/libgdx/wiki/ProjectSetup
and added SpriteBatch and Textures from:
http://code.google.com/p/libgdx/wiki/SpriteBatch
I will only use textures in this app. what have i missed? what is wrong?
the following code:
com.badlogic.gdx.Graphics.DisplayMode[] modes;
modes = Gdx.graphics.getDisplayModes();
for (com.badlogic.gdx.Graphics.DisplayMode mode : modes) {
System.out.println(mode);
}
Only give the line: 480×320, bpp 0, hz: 0
I get a message “MALI_NO_HANDLE in function _mali_base_common_mem_alloc because the requested_size is 0” can this be related?
any ideas?
I put this in the AndroidManifest.xml and it seemed to fix the issue:
Hope this works for you.