BB10 Orientation change

Hey everyone, I looked and found nothing of the sort that has been useful. Basically I'm migrating my Playbook to BB10 app, but I have problems with the direction of switching. On the playbook, I used stage.setOrientation (StageOrientation.DEFAULT); and stage.setOrientation (StageOrientation.ROTATED_RIGHT); and it has worked very well for the playbook, but on the BB10, this seems not to work at all. false this setting was the same for both devices.

Thanks in andvance and happy holidays to all

Although this solution solves some of the problems that's not really change the orientation. I have a call of qnx event for a toolbar at the top of the screen which should always be above the current value of orientation.

I think I've solved my problem by using stage.setAspectRatio (StageAspectRatio.PORTRAIT);
stage.setAspectRatio (StageAspectRatio.LANDSCAPE); with my current code.

Tags: BlackBerry Developers

Similar Questions

  • Image of the scale when screen orientation change

    I'm putting an image when screen orientation change, I put the logic based on sublayout. However, it is called no effect. It works fine the first time. Then, when I incline simulator, not touch.

    BitmapField private;

    protected void sublayout (int maxWidth, maxHeight int ) {}

    Super.sublayout (maxWidth, maxHeight);

     

                 if (width == Display.getWidth ())

    {

                    return;

    }

    on the other

    {

    width = Display.getWidth ();

    ctrHeadImg = ctrHeadImg.scaleImage32 (scaleXFixed32, scaleYFixed32);

    a = new BitmapField();

    a.setBitmap (ctrHeadImg.getBitmap ());

    loaded;

    layoutChild (, a.getBitmapWidth (), a.getBitmapHeight ());

    setPositionChild (, bitmap1.getLeft () + bitmap1.getBitmapWidth (), 0);

    ...................................

    setExtent (w, h);

    Can you elaborate on what you see?  What does not work?  Is called the scaleImage32 method?  The field is not be added to the screen or is the image not adjusted as desired?  What values are the scale by?

    I recommend having a look at this post.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=41782&query.ID=18...

  • HTML Article assemble dynamically, do scroll is not possible after the orientation change

    Hi guys,.

    I encountered the following problem today:

    Im having an HTML page set dynamically from a source JSON file, manipulation of information in JSON with jQuery. I'm downloading the page HTML (html page is empty until the page is in the DPS stack, then it builds) as an HTML article with the ' Smooth Scrolling: vertical. So far so good.

    When I open the page inside the Adobe viewer app on my iPad, I can see the "first" part of the page (the first 1024px in portrait orientation), but I am not able to scroll further down the page.

    However, when I do a change in orientation of the device (turn it landscape and then come back), I can scroll perfectly well and am able to see everything on the page (so I'm quite sure that the json in jquery for html conversion work). still unknown, when I let the page tell me his height (via $("body").height () and $(document) .height ()), it shows me that the height of the page is in effect (for example) the 10.000px, but I am not able to scroll down until I do the orientation change.

    am I missing something? im sure that my code is correct, because once I change the direction of my camera, everything works perfect.


    I hope that my problem is understandable, any help is very appreciated.


    Thank you


    Max

    You have correctly identified the root cause: we ask the page height so we can tell the web control what content is the height. If there is JavaScript that runs when the page is loaded (or at any other time, honestly) which changes the height of the page, what could happen after that we ask for the height.

    It is, unfortunately, no way to send a signal to the app ask that we re - check the height of the page and update the web control accordingly. I think the reason why it works on rotation, we only are not destroy and recreate the web control, so the height of your page is calculated correctly, but we re - ask the height so we can draw the control.

    Neil

  • BB10 Simulator orientation change?

    Is there a clear way to change the portrait and landscape and vice versa on the Simulator? I tried to drag diagonally so many times all I managed to do is to toggle the virtual keyboard. I tried to use the controller, but it doesn't seem to work (tried all RPY presets..)

    [two nights towards the end of the update... [

    It works! The last Simulator (gold) manages the gesture of change of direction very well for the browser.

    The strange thing about this one is that the keyboard does not appear to display when you click at the bottom left, but if I move the mouse above where it should be then it appears (even if it wobbles).

  • iPad, screen Orientation change without moving the iPad? An application perhaps? Is this possible?

    I would like to have the ability to change the orientation of the screen without physically rotate the iPad vertically.

    Here's what I mean.

    I have the iPad on the desktop and I want to check the email in landscape mode, I move on the table horizontally to landscape mode and orientation should change. It is not for the moment. I have to raise the iPad on the table and to change the direction from Portrait to landscape and when I go back to an application demanding in portrait mode, I have to again raise the iPad on the table.

    I was wondering if there is a utility app that allows the switch without raising the iPad and turning to change direction.

    Hello amitkapila2,

    Yes a few apps will change your orientation when you start them. Try roating your iPad in landscape ounces landscape enable locking focus on the home screen (in the last control center) and then launch the application of it rotates so it's the app.

  • Windows screen orientation changed from horizontal to vertical

    Someone already had the modification of the provision for the Office of the horizontal to vertical.  My baby accidentally got on the computer and somehow changed the orientation of the screen.  Can someone help to solve.

    If you set the computer on its screen-side up it seems ok, but of course, you cannot type on the keyboard.

    That can be hard on the neck. :)

    Press Ctrl & Alt keys, and use the arrow buttons to turn it back.

    Alternative: right-click on the desktop | Screen resolution | Orientation.

  • How to change direction to leftToRight topToBottom presentation, if the screen orientation changes from portrait mode to landscape

    Hi, I want to change direction in container of topToBottom to leftToRight so change your screen from portrait to landscape orientation.

    How to do this?

    I'm already using this

    on QML

    attachedObjects:]
    {OrientationHandler}
    onOrientationAboutToChange: {}
    If (direction == UIOrientation.Landscape) {}
    myContainer.layout =... / / to leftToRight
    } else {}
    myContainer.layout =... / / to topToBottom
    }
    }
    }
    ]

    I do not know how to set the new value

    Thank you

    Hello

    Use this code below:

    attachedObjects:]
    {OrientationHandler}
    onOrientationAboutToChange: {}
    If (direction == UIOrientation.Landscape) {}
             myContainer.layout.orientation = LayoutOrientation.LeftToRight / / landscape
    } else {}
             myContainer.layout.orientation = LayoutOrientation.TopToBottom / / portrait
    }
    }
    }
    ]

    Thank you

  • JQuery Mobile fixed foot bar disappears when the orientation changes

    I develop mobile applications using JQuery Mobile, in the home page which is the home page, everything is fine but when you go to the next page and change of ths foot disapers completely orientation, but the code that I use for all pages are the same

    Here is the code that I use for the foooter

      
    

    Help, please

    regarding

    Thanks for answer, I have the problem solved,

    I just added

    data-position = "fixed".

    and it solved the problem

    so now the correct code is

  • Orientation change not right when rotating rear

    Hi all

    I just found a problem when trying to listen to policy changes. I am using SDK 1.0.1 and test on a device with OS 1.0.3.1868 installed. I hope that I can make clear:

    If I rotate the camera 360 degrees in the same direction, everything works fine. However, when I change the direction things become messy.

    Say my current orientation is in position 1 and I rotate in a clockwise direction to position 2. 2 position, if I tilt left back to position 1 fires a change event, but it is not actually change the orientation. The orientation itself remains in position 2, but it raise an event for change as evidenced by a screen flash.

    Now, the machine always shows the 2 position, but the device itself is physically in position 1. I have to physically rotate to position 2 and then back to 1 to see the content according to position 1.

    [edit]

    In other words, to get this behavior, I need to run a device twice. First of all in all directions, then in the opposite direction.

    The operating system changes to the correct position. The scene registers an ORIENTATION_CHANGE or RESIZE event, but not a real change that remains in the same position.

    [/ Edit]

    I listened to StageOrientationEvent.ORIENTATION_CHANGE and Event.RESIZE scene with the same results.

    If I'm missing what is obvious, or is this a bug? I found in the incident handler.

    Code attached.

    Thanks in advance for any help.

    Daniel

    package
    {
        import flash.display.MovieClip;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
    
        import flash.events.Event;
    
        import qnx.ui.text.Label;
    
        [SWF(backgroundColor = "#FFFFFF", frameRate = "30", width = "1024", height = "600")]
        public class OrientationTest extends MovieClip
        {
            private var label:Label;
    
            public function OrientationTest()
            {
                label = new Label;
                addChild(label);
    
                addEventListener(Event.ADDED_TO_STAGE, ready);
            }
    
            private function ready(e:Event):void
            {
                removeEventListener(e.type, arguments.callee);
    
                stage.align = StageAlign.TOP_LEFT;
                stage.scaleMode = StageScaleMode.NO_SCALE;
    
                stage.addEventListener(Event.RESIZE, notify);
            }
    
            private function notify(e:Event):void
            {
                label.setSize(stage.stageWidth, stage.stageHeight);
    
                label.text = stage.orientation + ": " + stage.stageWidth + "x" + stage.stageHeight;
            }
        }
    }
    

    InitialWindow descriptor XML:

    
            OrientationTest.swf
            true
            true
            true
            true
            gpu
    
    

    Found the culprit.

    In the application descriptor xml, the weirdness only happens when the renderMode is gpu:

    gpu
    

    Set to auto or cpu works fine (auto by default cpu):

    auto
    

    or

    cpu
    

    I'm this deposit as a bug.

  • How to maintain a State of being locked to the orientation change?

    Example:

    I have a page with several tabs on the side left which changes the State of an object multi-state at the center of the layout. The tabs are numbered 1, 2, 3 and 4.

    While in position vertical, I select tab 4 and the multistate object transitions to the State 4.

    I then turn the appliance and layout changes to horizontal orientation, however my selection of the tab back to 1 and my multistate object returns to the State 1.

    Each button and the State as well as the WHO itself must have identical names.

  • Form fields orientation changes?

    I have 2 seemingly identical forms, one with fields and one without. When I try to 'replace pages' on the form without fields in the form with fields, all fields appear at an angle of 90 degrees (portrait). I tried to change the orientation in the field properties, but it is simply by changing what's inside the field and not the field itself. The form has more than 100 areas, so I hope not to have to redo all these fields.

    Any ideas on what I am doing wrong? Thank you.

    One of your files has a rotation of page applied to it (even if they look

    the same), and thus the fields turn when you replace the

    pages. The solution is to use a script to rotate the fields '

    contact information (which can be a bit complex) or print the file running under a new

    PDF file, thus eliminating the rotation and then import the fields

    to it.

  • BB10 - screen change on slide left and right

    I am very new to the BlackBerry 10 HTML 5 development. I am trying to create a sample application that has several screens. I woud load a screen to the starup. Is it possible to go to the screen next on slide to the left? Also go to the previous screen by hitting to right swipe? I don't see any samples in the BBUI. JS to do this. Any help is appreciated.

    Kind regards

    Satish.

    Hi Sissi,

    AFAIK there is nothing built in yet. But a couple of JavaScript libraries just are waiting to be implemented.

    11 multi touch and Touch Javascript libraries events

    It will depend on you and your favorite JS libs (e.g. JQuery, Moo,...)

  • I need to know how to change the orientation of the taskbar.

    Somehow my taskbar orientation changed from horizontal to vertical & I want to restore it.

    http://support.Microsoft.com/kb/253679

  • Bug? Torch 9800 does not change its orientation to a tilt

    Hi all

    I'm trying to debug the landscape and I can't make it work properly.

    It turns out that my resize() method is never called because

    I check for orientation change, and it's always the portrait.

    No matter how I tilted it (in the Simulator).

    I use the Simulator for 9800.

    When I use the 9500 Simulator, a tilt changes orientation.

    Anyone see this?

    Bug?

    Customer wants this to work, but appears broken on 9800.

    Thank you!

    lucidbee

    If the keyboard is open, then the device is locked in portrait mode.  You must close the keyboard to test it in the Simulator and the device.

  • Change orientation distorts the content of the screen on Dev Alpha (10.0.6.545)

    I use the Beta 2 SDK and my Alpha Dev is updated to 10.0.6.545.

    I want my application to support the changes in orientation from portrait to landscape and back. To implement, I followed the tutorial at:

    https://developer.BlackBerry.com/Cascades/documentation/dev/orientation/index.html

    When I flip the Alpha of Dev to change the orientation of the fashion portrait to landscape mode, it works. But when I flip it back to leave for the portrait, the content of my app's screen gets distorted / destroyed somehow so that more or less garbage appears. It is not just a question that all of my components are not moved or something (I understand I must handle this) but the screen content is garbled. When I go again in landscape mode it seems ok again. But when I go to the portrait of the screen is still once deformed. Here is a screenshot:

    I've found that I can reproduce this behavior also with examples of applications like weatherguesser and also with costs projects created from the project templates as examples NavigationPane or TabbedPane when I just turn on self-orientation in their bar - descriptor.xml file and just add an onCreationCompleted handler in their main.qml:

    onCreationCompleted: {
        OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.All;
    }
    

    Since the orientation change works very well for the operating system itself and the browser pre-installed too, and only my apps are affected, I think that I'm doing something wrong. Any tips?

    Is the source code for the tutorial above available as an archive available for download somewhere? I want to check it out.

    Or is it is a known issue in Beta 2? (I did not implement the change in orientation of support before Beta 2).

    (I have not found anything on this issue in the issue tracker.)

    Thanks in advance

    I've updated to Beta 3 SDK and the Dev Alpha 10.0.9.388 and this bug seems to be fixed.

Maybe you are looking for

  • Firefox asks me a key to recovery. No other device has the account.

    I do not have my favorites, etc. on another device and I just installed a new operating system. I have my key to recovery. I am registered in sync but nothing happens when I click Synchronize now. How can I use my recovery key?

  • Creating a shortcut to open a Web site in IE Tab

    I have a little a question rather than a problem. My father uses security cameras which is GUI runs on ActiveX, so I need IE tab to launch the GUI (and it does a great job at it). However, I'm trying to simplify the process for him as much as possibl

  • Need help restoring iphone broken!

    My iphone crashed to the ground and now broken screen. I can't use the screen at all then now when I plug it into my computer it won't recognize it since I can't type my password. I tried to put in DFU mode, but since I can't even turn the unit off i

  • "450 ordinal is not found in the dynamic link library urlmonn.dll" or something. What does that mean?

    I downloaded and installed the windows 7 transformation pack and then when I removed it a few months later he repeated this message whenever I started a program.

  • Firewall - risk Message System

    I am getting a balloon in the taskbar (right side) which says that my system can be in danger because of my firewall is not turned on.  It says to click on the ball to correct the problem.  This opens the Security Center, which shows that the firewal