www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: PaniX on September 20, 2013, 07:12:44 pm

Title: Screen Size +FullScreen
Post by: PaniX on September 20, 2013, 07:12:44 pm
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!
Title: Re: Screen Size +FullScreen
Post by: EgonOlsen on September 20, 2013, 09:53:49 pm
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: [Select]
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(LayoutParams.FLAG_FULLSCREEN);
Title: Re: Screen Size +FullScreen
Post by: PaniX on September 21, 2013, 07:01:57 am
Hm, I've also found the method adding
Code: [Select]
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >to the Manifest...
Is it a good way?
Title: Re: Screen Size +FullScreen
Post by: EgonOlsen on September 21, 2013, 05:17:45 pm
That's fine too. I prefer code over XML but that's just me.
Title: Re: Screen Size +FullScreen
Post by: PaniX on September 21, 2013, 07:27:01 pm
I don't like the XML that much, because it was confusing when I've started learning java on Android.