2 posts / 0 new
Last post
Felix Kenton
fpkenton's picture
Offline
Mobile Conjurer
Joined: 5 Sep 2011
Posts:
Android Fullscreen Issue

I'm not sure whether this is down to MoSync or the Android system, but the code snippet below demonstrates what I imagine to be a common use case for maSetFullscreen().

maScreenSetOrientation(SCREEN_ORIENTATION_PORTRAIT);
maScreenSetFullscreen(1);

MAExtent screenDim = maGetScrSize(); // Does not receive full screen size (gets old size eg: screen-toolbar)

I am not entirely sure at what point maScreenSetFullscreen actually takes effect, but so far the only way I have found of getting it to work correctly is to listen for a custom event of EVENT_TYPE_SCREEN_CHANGED. Is there a simpler way to get it to work?

Felix

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Felix Kenton
fpkenton's picture
Offline
Mobile Conjurer
Joined: 5 Sep 2011
Posts:

I have somewhat solved this myself...

Calling maScreenSetFullscreen(1) in my Moblet constructor rather than in my first screen's constructor (which is also in the Moblet's constructor!) seemed to do the trick. The call the maGetScrSize() is still in my first screen's constructor.

Hope this helps someone!

Felix