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

Posts: 43
Registered: ‎11-19-2010
My Device: Blackberry Tour
My Carrier: Verizon
Accepted Solution

Dev Alpha, Air Beta: Actionbar

Has anyone here tried using the ActionBar in the beta yet?  I used the following code and it looks like the whole screen is down about 1/3 of the way and the with of the actionBar are sized way to big by defaultand going off screen.


    import flash.display.Sprite;
    import flash.system.Capabilities;
    import qnx.fuse.ui.actionbar.ActionBar;
    import qnx.fuse.ui.core.Action;
    import qnx.fuse.ui.core.Container;
    public class AIR_MenuTest extends Sprite{

        public static var ScreenWidth:int = Capabilities.screenResolutionX;
        public static var ScreenHeight:int = Capabilities.screenResolutionY;
        private var cont:Container = new Container();
        private var actionsForBar:Vector.<Action> = new Vector.<Action>;
        public function AIR_MenuTest(){
            cont.setActualSize(ScreenWidth, ScreenHeight);
            cont.setPosition(0, 0);
            trace("X: " + cont.x + ", Y: " + cont.y);

            var back:Sprite = new Sprite();
            back.graphics.drawRect(0,0,cont.width, cont.height);

            cont.background = back;
            var actBar:ActionBar = new ActionBar();

            actBar.setPosition(0, 0);
            actBar.width = ScreenWidth;

            for(var i:int = 0; i < 4; i++){
                actionsForBar.push( new Action("A" + (i+1)));





Maybe I am setting something up incorrectly?

Thanks in advance


PS: has anyone used the Crosscut menu yet either?

Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Dev Alpha, Air Beta: Actionbar

You have to set the position of the action bar. It does not automatically put it at the bottom of the screen.