orientation of the screen from locking/unlocking code

I know that we can lock the screen orientation by setting autoOrient false tag in the xml file.

I want a certain vision in my application must be blocked to the landscape, while another view to lock on the portrait, and others without orientation lock. Is it possible to do? Or I have to manually manage it me via OrientationChangeEvent?

Thank you

AutoOrients is not something you can change during execution (unfortunately), so your only option is to allow it, listening for the orientationChange event and in some cases of preventDefault() on it.

Peter is right, but the solution seems a bit more complicated than it should be, probably because it targeted AIR 2.5, where they took setOrientation() API for a reason any...

If you target AIRT 2.7, stage.setOrientation () should be all you need to use to manually set the direction, IE when the view is loaded, you manually set the direction landscape and preventDefault on all the orientation changes. Then, when the view is dropped, you setOrientation() to what it was previously and allow events to pass by...

Tags: BlackBerry Developers

Similar Questions

  • change the orientation of the screen from vertical to horizontal

    I ran a quick scan on mcaffee and after I went to close my screen orientation went from vertical to horizontal, i.e. the top of the page to the right of the screen instead from the top of the screen.  How can I change this back?

    It is generally a function of your video card. With the help of the CTRL or the ALT key in conjunction with the arrow keys, you should be able to rotate the screen back. You can also try right clicking on an empty space on your desktop and search for context of graphics Options menu, graphics properties or something similar. Then look for Rotation or Orientation, or, possibly, landscape and Portrait.

    I hope this helps.

  • The Smartphones from blackBerry unlock code does not work on the Curve 9380

    I tried for a certain whille now unlock my Curve 9380. My telephone provider sent to customer service but she is still unlocked. Apparently the code given by Blackberry doesn't seem to work.

    What do you suggest me to unlock this phone? I would like to give to my parents who have a different phone provider.

    Thanks in advance for your help.

    You can buy a reputable vendor codes. One is unlock.berryreview.com and another is linked below in the unlocking Guide.

  • How do change scrollViewProperties scrollMode from vertical to horizontal so change the screen from portrait to landscape orientation

    How to change scrollViewProperties scrollMode from vertical to horizontal if the orientation of the screen change mode portrait mode to landscape?

    I try like this, but not work

    {OrientationHandler}
    onOrientationAboutToChange: {}
    If (orientation is UIOrientation.Landscape)
    scrollViewId.scrollMode = ScrollMode.Horizontal; scrollViewId-> id scrollView
    on the other
    scrollViewId.scrollMode = ScrollMode.Vertical;
    }
    }

    Thank you

    Hi, I changed the code like this and works

    {OrientationHandler}
    onOrientationAboutToChange: {}
    If (orientation is UIOrientation.Landscape)

    scrollViewId.scrollViewProperties.scrollMode = ScrollMode.Horizontal;
    on the other

    scrollViewId.scrollViewProperties.scrollMode = ScrollMode.Vertical;
    }
    }

  • Portege Z20T: Windows 10 - change the orientation of the screen don't work

    Hello

    in the instructions:

    Change the orientation of the screen
    When you use the computer in tablet mode, you can change the orientation of the screen of the computer on the side routing. The screen orientation automatically changes depending on the angle of rotation detected.

    But he won't!
    The operating system is windows 10.

    What can I do?

    This response from Toshiba is a scandal.

    Tut mir sehr leid, dass Sie eine negative Erfahrung mit your Toshiba Gerät machen track.

    Hotel der Themen-Komplexitat und moglicher necessary aufgebaute können Anfragen zur configuration und von the Installer (Treiber, operating system etc.) nicht immer completely by email where werden. WIR bitten daher UH Verstandnis.

    This use Sie bitte unsere umfangreichen online Supportangebote oder wenden Sie an unsere expert unter 0900-18674422 (1.56 Euro/Minute).

    If Sie noch questions haben, zögern Sie bitte nicht, Rubis mit each Kontakt aufzunehmen. You can reach each Montag bis Freitag von 8.00 Uhr bis 18.00 Uhr unter der 52 40 40 00 (0 21 31) telephone

    MIT thank wurde.

    A.i. EMI Service

    Who can help you, what does not help support? ??????????

  • The orientation of the screen turned sideways!

    My dog stepped on the keyboard and the orientation of the screen is now sideways. How back to the normal orientation?

    Hello
    1. try Ctrl + Alt + arrow right key (or possibly left or up or down arrow.)
    2. go to display settings (from Control Panel or right click on the desktop) and look for an option to rotate the screen.
    3. check the system for an icon for Nvidia Control Panel or similar tray and look for the option "rotate screen" there.

    Hope this helps,
    Don

  • Can not see the notification when the screen is locked

    When adding exchange (outlook) account, and because it requires security settings, I'm not in a position more to see notifications when the screen is locked.
    I deleted the exchange account, and notifications are visible when the screen is locked.
    To confirm, I added my exchange account again, and notifications is not visible when the screen is locked.
    I need to unlock to see the notification.
    How to solve this problem to take advantage of this last feature.
    Thank you.
    Saami.

    Topic locked as response has been received and there is already a topic about this.

  • Doubts in the Orientation of the screen

    Hi guys, I'm developing my component. In it, I add the LabelField which displays the width of the screen, and when I change the orientation, the LabelField does not replace the old width of the labelfield, but may make changes to the things that are done in the paint while screen orientation.

    How to change.

    It's code

    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.Manager;
    
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    import net.rim.device.api.ui.component.LabelField;
    
    /**
     *
     * @author rakesh_2
     */
    public class Component extends Manager
    {
        LabelField ld;
        int val;
        String s,s1;
        Font ft,temp;
        Component()
        {
            super(Manager.FOCUSABLE);
            chk();
            ld=new LabelField(s);
    
            this.add(ld);
    
        }
    
        protected void sublayout(int arg0, int arg1)
        {
            chk();
    
            Field ff=this.getField(0);
            this.setPositionChild(ff, 5, 5);
            this.layoutChild(ff,Display.getWidth(), Display.getHeight()/2);
            this.setExtent(Display.getWidth(), Display.getHeight()/2);
    
        }
        public void chk()
        {
            val=Display.getWidth();
    
            s=String.valueOf(val);
            s1=s;
        }
        public void paint(Graphics g)
        {
            g.drawText(s, 15, 15);
            super.paint(g);
        }
        public void paintBackground(Graphics g)
        {
            g.setBackgroundColor(Color.LEMONCHIFFON);
            g.clear();
        }   
    
    }
    

    So how do you change the LabelField width on the orientation of the screen?

    Concerning

    Rakesh Shankar.P

    The values returned by Display.getWidth and Display.getHeight need to change after the rotation of the screen.  Screen rotation may or may not change the size of a field.  For example a field cannot take the width of the screen in portrait or landscape mode, so you won't see any changes.

  • Deactivation of the orientation of the screen for my application.

    Hello Sir/Madam,

    Please tell me how can I disable the orientation of the screen as my app looks good horizontally. Thanks in advance.

    Kind regards

    Sandesh

    This can be achieved by adding the code to your file config.xml below

    
    

    Please see the link for more details below. http://docs.BlackBerry.com/en/developers/deliverables/27280/Widget_element_834671_11.jsp

  • How to store Internet Explorer running when the screen is locked?

    Hello! So, I am owner of a Surface... Yes! Somehow...

    Because Microsoft App Store refuses to give us of Pandora, Youtube and other needed applications, the only way to use these pages is through Internet Explorer...

    (in my opinion, they do it so that someone using Internet Explorer)

    Now, ok, I did that! I search for the pages I need and have pin them at the beginning... Yes, problem solved?

    NO.... The screen, if you don't touch anything, or move the cursor or something, it locks itself automatically after a certain time... and the music and the videos just stop playing.

    Now, when I go to Internet Options, I can't find anything to fix this. Change PC settings or... In customize, where it says lock screen Apps, it gives you the opportunity to choose "the apps run in the background...". ", but Internet Explorer is not available for this.

    Now, someone, anyone... tell me how that's possible! How can I leave Pandora running or a 1 hour running YouTube video?

    What are my options?

    1. setting of the Tablet does not interrupt or stop using the internet explore when the screen is locked... Is it still possible?

    2. the Tablet for only auto setting not lock screen when I use some applications, such as Internet Explorer (again probably not possible)

    3 magically App Store makes it available Youtube Pandora Facebook and other necessary apps (pfffff apparently does not have to spend)

    4. all that have worked for you guys... Any Suggestions?

    These are just little things that have made use of my annoying and incompetent little practical Surface... It's sad when smartphones can be more useful and practical than my Surface... really really sad. This comes from someone who wants this work effective and favourable way to the customer.

    Thank you for reading, for help, for viewing and understanding, I hope that I'm not the only one with this problem!

    > How can I leave Pandora running or a 1 hour

    You could try PRadio in the store:

    PRadio is a third Pandora Internet Radio App for Windows 8 modern.  It allows users to listen to music from the Pandora recommendation service in the background.

    Kate

  • My daughter Air2 IPad takes too long to save. It is connected to wifi, connected and the screen is locked.mAny advice?

    My daughter Air2 IPad takes too long to save. It is plugged in, connected to wifi and the screen is locked. Any tips?

    How long is too long? If it lasts for more than a few hours - and even that is too long in my humble OPINION - then something is wrong. Completely backup, because it will not terminate in any case if its been so long, forced to reboot the device and try again.

    To force the reboot your device, press and hold the two buttons of sleep/wake and home for at least ten seconds, until you see the Apple logo.

    This may not work either. The backup may be damaged and you will need to remove and start over. However, its easy starting point and it will not hurt anything. If the backup will not end, he has nothing to lose.

  • music player when the screen is locked

    Hello.
    Some devices show a practical widget when the screen is locked, but not of compact z1.
    I usually listen to music on spotify and when I received a call, the cell phone showed the widget on the locked screen. Not to mention that I was able to control spotify with the headset control.
    Then I stuck the screen again and it no longer works.
    I tried to find a configuration, but I couldn't.
    Can someone help me?
    Thank you

    Disable or remove the smart key and see.

  • change the orientation of the screen?

    How can I change the orientation of the screen?

    Hello

    Try to press Ctrl + Alt + up ARROW, or try Ctrl + Alt + and a different key to the arrow.

    If this does not work: right-click on empty office rotation - graphics options.

  • get a pop up on the screen saying lock shift is enabled or disabled

    I have a windows 7 PC Samsung RV510 and when I hit the caps lock key it does not say whether shift caps lock is enabled or disabled.

    Everything on the screen caps lock is via the software provided by the computer manufacturer.  In the case of may with a Dell laptop, the screen is a function of the software Quick Set of Dell.  I don't know if Samsung offers something similar.  Another option, you can watch, is that Windows 7 has an option to play a sound when the SHIFT key is hit.  Actually, I prefer since I did not look at the screen to be informed that I accidentally hit the caps lock key.  It is controlled via start > Control Panel > accessibility > change how your keyboard works.  (Or if you go to the search box of the programs and files immediately above the Start button and type "toggle", then "Change how your keyboard works")  Once there, but a check mark beside of the "turn ToggleKeys.

  • How to detach the screen from the keyboard, and how do I use the touch screen without stylus?

    I have a gateway M285 ta6 t2300 clocked at 1.6 ghz dual core 1 GB 40 GB combo windows 7 tablet laptop 2-1 d. I don't have a pen for the touchscreen, but because I bought it used... I would like to know if I can use the touch screen using my fingers or do I have to buy a pen and if so what kind? Also, I would like to know how to detach the screen from the keyboard.

    Hello

    I suggest that you go to the Gateway Web site and download a manual for the model that will show you how to use it.

    Gateway:

    http://us.gateway.com/GW/en/us/content/drivers-downloads

    See you soon.

Maybe you are looking for

  • Can ping but not connect to the system in real time

    Hi all I have a funny glitch that has arisen recently.  I have a PXI chassis running an RTOS that I am able to reach with LV and MAX when I sit on the local network.  I have the chassis in a DMZ, so she is directly exposed via the external IP network

  • arial font is not compatible regular

    I have a problem using Family Tree Maker 2011 worm. When generating reports, that the program is closed. Apparently, this is due to "Regular, police Arial doesn't support style. Please help, I have to do.

  • How will I know if my XP Pro OS has 64 or 32-bit?

    How will I know if my XP Pro OS has 64 or 32-bit?

  • Reinstalling windows 7 upgrade disc.

    If someone could help please, I have upgraded windows vista professional to Windows 7 Professional some time ago. My hard drive is damaged and I need to install a new one. Is it possible to install Windows 7 Professional and activate using my license

  • Consolidation of all combinations of subgroup

    Hello Experts,I have a table that contains the list of user code and group. I would like to form groups if users have the same group code. Here are examples of data.Given for entryUser codeGroup codeANGALFM_AGFARE1TANDFM_AGFARE1CHANHFM_AGFARE1ANGALFM