jPCT-AE - a 3d engine for Android > Support

Screen Size +FullScreen

(1/1)

PaniX:
Two hopefully smaller questions, which aren't direct about JPCT-AE, but which may be helpful for others using the engine too.
1) How to get the screen size from the smartphone the user uses?
2) How to make the application full screen, without the status bar on the upper part of the screen?
Thanks!

EgonOlsen:
There might be other ways, but at least the onSurfaceChanged()-method will be called with the current dimensions.

About the status bar, i'm doing:


--- Code: ---requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(LayoutParams.FLAG_FULLSCREEN);

--- End code ---

PaniX:
Hm, I've also found the method adding

--- Code: ---android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
--- End code ---
to the Manifest...
Is it a good way?

EgonOlsen:
That's fine too. I prefer code over XML but that's just me.

PaniX:
I don't like the XML that much, because it was confusing when I've started learning java on Android.

Navigation

[0] Message Index

Go to full version