Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.634 Dev OS, Z30 (STA100-5)-10.3.1.634 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917
Accepted Solution

App not using fullscreen

I'm in the process of "future proofing" my app before I start adding more features to it. I remember at some point, I believe a Webcast, RIM saying to make the app UI work off of the screen width and height instead of hard-coding positions because there could/would be other sized PlayBooks in the future.

 

So in that effort I started playing around, but noticed that my UI elements were starting at a position that wasn't the upper-left of the screen. After doing some investigation I realized that the "stage" was only 500 by 375, a 4x3 resolution and the PlayBook was centering this in the middle of the screen (the odd UI element offset).

 

At the top of the initial app class your supposed to specify a "[SWF(...)]" attribute. The only part I don't specify is the screen size. When this is set then the stage takes the specified screen size.

 

Finally, the app still takes up the whole screen but the UI is specified that it only takes up the relatively small area. The stage has fields specifying the "fullscreen" width and height, and also specifies the display state as "normal" instead of "fullscreen".

 

Does anyone know how to get the app to take up the full screen real estate, without specifying the absolute screen size in the SWF attribute?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
TheDarkIn1978
Posts: 409
Registered: ‎12-10-2010
My Device: PlayBook

Re: App not using fullscreen

this should work:

 

 

//Class
[SWF (backgroundColor = "0x000000")]
public class FullScreenTest extends Sprite
     {
     //Constructor
     public function FullScreenTest()
          {
	  stage.scaleMode = StageScaleMode.NO_SCALE;
	  stage.align = StageAlign.TOP_LEFT;
	  stage.frameRate = 60;

	  init();
	  }

 

 


PlayBook Applications:
Drop Swatch
Please use plain text.
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.634 Dev OS, Z30 (STA100-5)-10.3.1.634 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: App not using fullscreen

Perfect, thank you.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.