Rotation of the device

which method was callen after the rotation of the device?

Or how I could change my interface after the rotation of the device?

sublayout is called as the dimensions change.

You can also use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/AccelerometerListener.h... listening to the changes, but you want to update the method of sublayout interface would be easier.

Tags: BlackBerry Developers

Similar Questions

  • Redraw the images after the rotation of the device

    Hi, all)

    I need redesign my interphace after the rotation of the device...

    I have a method in myScreen,

    public LoginScreen()
    {
    scaleKoof = Display.getWidth () / 320.0f;
    Create the interface elements

    }

    If I coluld call it after rotating all might be good! How can I do?

    scaleRotation - all images are resized to my interpace...

    replace sublayout and check the dimensions, it is called after a rotation.

  • Unable to detect the rotation of the device of the method of sublayout of screen

    I'm developing an application compiled for OS 4.5. I need to find a way to detect the rotation of the unit and again fill the screen so that the fields are arranged according to the new dimensions.

    My idea was to save the display width and height in some private variables in my case screen and method of sublayout overloaded screen, check if the new values have been changed.

    What happens is that I get the old width and height again and again.

    I first read this post. In this document, @arkadyz points out how the order of the calls is a little weird and values returned by the view class are updated after sublayout is finished.  Therefore, there is no way to detect by the sublayout method.

    The proposed solution is to check the dimensions of the display within an invokeLater. Here's my test code:

    public class TestScreen extends MainScreen {
    
        public TestScreen(){
            super(Manager.NO_VERTICAL_SCROLL);
            populateScreem();
        }
    
        private void populatescreen(){
            deleteAll();
            //fields and containers added here. No need to add any to observe the issue.
        }
    
        public void sublayout(int width, int height){
            super.sublayout(width,height); //Tried calling this in the last line as well with identical result.     
    
            System.out.println(">>>>>>>>> Display.getWidth(before): " + Display.getWidth());
            System.out.println(">>>>>>>>> Display.getOrientation(before): " + Display.getOrientation());
            System.out.println(">>>>>>>>> Width argument value (before): " + width);
    
            UiApplication.getUiApplication().invokeLater(new Runnable(){
                public void run() {
    
                    System.out.println(">>>>>>>>> Display.getWidth(later): " + Display.getWidth());
                    System.out.println(">>>>>>>>> Display.getOrientation(later): " + Display.getOrientation());
                }
            }, 1000, false); //Playing with the time parameter does not change behavior.
        }
    }
    

    This gives exactly the same results. After that, I came to this post where @peter_strange

    provides a solution based on pushing a dummy screen, which detects the new width and height, and then passing the new values to the previous screen. I also tried, but it didn't work either.

    I also tried using the obsolete Graphics.getscreenWidth instead of Display.getWidth, and it did not work.

    Now, I am out of luck because I have almost tried everything and I can't provide a solution without resorting to the 4.7 or 6.0 API.

    Tested in BB 9550 Simulator v5.0.0.535 (Platform 2.13.0.108) and v5.0.0.306 real unit BB 9520 (Platform 4.2.0.113)

    Take a look at the following.  In my view, the following code can be used to detect changes in orientation.

    public class TestScreen extends MainScreen {
    
        int currentDisplayWidth = Display.getWidth();
        int currentDisplayOrientation = Display.getOrientation();
    
        public TestScreen(){
            super(Manager.NO_VERTICAL_SCROLL);
            populatescreen();
        }
    
        private void populatescreen(){
            deleteAll();
            //fields and containers added here. No need to add any to observe the issue.
        }
    
        public void sublayout(int width, int height){
            super.sublayout(width,height); //Tried calling this in the last line as well with identical result.     
    
            System.out.println(">>>>>>>>> Current sublayout width (before): " + currentDisplayWidth);
            System.out.println(">>>>>>>>> Display.getWidth(before): " + Display.getWidth());
            System.out.println(">>>>>>>>> Display.getOrientation(before): " + Display.getOrientation());
            System.out.println(">>>>>>>>> Width argument value (before): " + width);
            if ( Display.getWidth() != currentDisplayWidth ) {
                // process orientation change
                // ....
                // Now reset change detection variables.....
                currentDisplayWidth = Display.getWidth();
                currentDisplayOrientation = Display.getOrientation();
            }
        }
    }
    
  • Left/right rotation is always grayed out in the device Simulator

    If I run my application in Air Debug Launcher (Mobile), "turn to the left" and "turn right" options in the menu of the device are still grayed out, regardless of whether the publication settings have enabled auto-orientation. This is what prevents the orientation test code. Anyone know a solution?

    More, I found (via a textfield, the current focus of the statement) that my AIR application does not throw the guidelines 'default' or 'upside down' on my device (Asus Transformer to infinity). Only, he throws "left turn" and "turn right". Anyone know of a solution for that?

    Thank you!

    The rotation buttons are enabled only in 'ANY' l report mode / h and auto guides set to true. For other values of aspect ratio, the orientation of the stage must stay in one of the directions specified by the aspect ratio and therefore should not turn.

  • (hp envy 13-j000na 2 x) does not auto-rotation of the screen after upgrade to windows 10

    I can put in power 'Rotation lock' and "tablet mode" in the center of the action, but this does not help.

    I have noticed that after the last MS updated (KB3093266), auto-rotation started working even after a restart of the tablet. In Device Manager, the device driver Simple guidance is installed. For the moment, I think my problem is solved.

  • error message when try to sync the iPhone, "invalid response from the device?

    What can I do when I receive this error message when you try to sync to my iPhone 5 s - "invalid response from the device?

    -What are your 5 updating to 10.0.2 iOS iPhone? If this is the case, you must have the latest version of iTunes on your computer, which is required for Mac OS X 10.9.5 12.5.1, or above. To meet these specifications will be receiving this error.

  • Rename the mac for a list of the devices apple ID?

    After getting a new MBP 15"I have now two devices listed under my identifier Apple as 'Cynthia MacBookPro 15"... »

    If I wanted to continue to use the other oldest, I wish I could tell them apart. How can I rename them? I thought naming drives was sufficient, but these names do not appear (these are the names that a be assigned in the pane sharing preferences).

    Remove the device that you want to rename your Apple ID account. Go to system-> sharing Preferences and change the name as desired, then re - register this device with its new name.

  • What restoration brings back old bags in the device? I was always told that icloud restoration brings all the bugs back, yet care apple lately told me than vice versa. I'm lost in a cleaner for restoration of backup: icloud or itune?

    What restoration brings back old bags in the device? I was always told that icloud restoration brings all the bugs back, yet care apple lately told me than vice versa. I'm lost in a cleaner for restoration of backup: icloud or itune?

    I've never heard a backup report bugs, however if you are interested in, you can always restore the device as good as new.

  • iTunes invalid response from the device

    Thus, since updating my iPhone 6 to IOS10, I have been unable to sync with my mac. When I plug my phone I get the message of athis on my mac...

    iTunes could not connect to the iPhone "iPhone", because an invalid response was received from the device.

    I click OK

    I look at my phone it asks if I want to trust this computer. I click Yes. Nothing.

    So I wait. Nothing. I disconnect and try again. Same thing. I tried all the USB ports on my mac. Same thing.

    Search the forums here, looks like a common phenomenon when connecting to a PC, but not a mac.

    Connection to a Mac Pro Tower

    10.7.5

    iPhone 6

    Devices running iOS 10 require the latest version of iTunes, which requires OS X 10.9.5 or more. It's time to upgrade.

  • A "synch" iTunes always means that the device (iPhone) will be synchronized to the iMac?

    A "synch" iTunes always means that the files will be copied to or removed from the device (iPhone) to match what is currently on the computer to iTunes (iMac)?    And not the other way around?     In other words, if my iPhone has a photo that does not exist on the iMac, the photo will be deleted from the iPhone when the two are in sync?  Thank you!!

    A "synch" iTunes always means that the files will be copied to or removed from the device (iPhone) to match what is currently on the computer to iTunes (iMac)?

    Yes. See recover your iTunes from your iPod or an iOS device if necessary.

    TT2

  • is itunes error message cannot connect to my iphone because of an invalid response was received from the device

    get error message that IOS 10 unable to connect to my iphone iTunes 6 because of an invalid response was received from the device

    Make sure you are using iTunes 12.5.1 or later, as it is required to communicate to iOS 10.

    If iTunes does not recognize your iPhone, iPad or iPod - Apple Support

  • IPhone will not connect to iTunes - "invalid response received from the device."

    After years of work very well, I went to put some new music on my phone and all of a sudden got this message "iTunes could not connect to the iPhone 'IPhone of David Platts' because an invalid response was received from the device."?

    I've tried different USB ports, different cables (some Apple official, some after market) and several reboots, but nothing works.

    I'm 10.7.5 OSX and IOS 10 phone you.

    Thanks for the help.

    You have a problem.

    It is good that you have told us you're OS x 10.7.5 (current is MacOS 10.12), because it is your problem.

    iOS 10 requires iTunes 12.5.1 or later to communicate.  iTunes 12.5.1 requres OS X 10.9.5 or later version.

    It's (time to upgrade the operating system of your Mac spent).

    macOS - official Apple Support

  • is there a way to remove the music draws in icloud or on the device?

    I'll be happy if everyone agreed with me on the use of apple's music. It's really too hard to remove a music of ios 10.  the new apple music wants users to play the song, then delete it; but by the old version, we could delete any song even we are not listening.

    shortly, I miss old versio of apple's music. because that have edit songs that you listen to the device was really easy.

    If any authorized person see this comment, please repeat aple music.

    Hi apoaktas,

    Welcome to the communities of Apple Support!

    Leave your post, we understand that you want to delete the music downloaded on your iPhone or your library, but the process is different than it was before iOS 10. The new process of removal of content is explained in the following article:

    Download music - iPhone

    Delete music stored on the iPhone. Touch and hold the song, album, playlist or clip. Tap on delete, and then click Delete downloads. The item is removed from the iPhone, but not icloud music library.

    See you soon!

  • iTunes could not connect to the iPhone "iPhone", because an invalid response was received from the device.

    So I am a new iphone 7. I had a 6 before that. Everything was fine until the day where I got the 7, I decided to try a manual on itunes for my 6 backup so that I could put this on the new phone. I use now icloud backup but before that he always did on my computer. Its itunes version 12.2.2.25 as it is the most recent, that I can run with 10.7.5 which is the newest my mac pro can work without hacking it. Again, never had a problem before it save and use it to transfer music. Anyway, I received the message "iTunes could not connect to the iPhone"iPhone"because an invalid response was received from the device." I tried 3 different usb cords. I tried both ports to the front of the computer and all 3 in the back. Abandoned and did a backup icloud. Installed on the new phone. Everything transferred except my music library which is real download of my CD via itunes. If something was wrong on the iphone 6, surely the new phone that starts with a clean slate will be very well... wrong.  Same message. Leaves through ports, cables, etc. Is it just a simple matter of ios 10 now works with my version of itunes?

    A new phone will be iOS10.  iOS10 requires iTunes 12.5.1 find which demands in turn 10.9.5 OSX or newer.  Software update checks only the updates to the current version of the system that you are running but that itself can be updated.  It may or may not be possible to upgrade your computer to the system requirements. Find your computer on the web site of http://www.everymac.com model and near the bottom of the specification of the system section, he will tell what versions of the operating system, it is able to run. If you can not run a newer system, you will not be able to sync this phone to your current computer. OSX 10.9 and 10.10 are no longer available. You can try to install the free El Capitan OSX 10.11.  El Capitan can run slower on older machines and require the additional purchase of RAM (4 GB is a minimum realistic and many recommend 8 GB).  Making a big jump in versions of system is also more likely to affect the old software.

    At el capitan Snow Leopard, it will make my macbook is slow?  - https://discussions.apple.com/thread/7412959

    Course OSX Upgrade General information, including configuration required - http://www.apple.com/osx/how-to-upgrade/

  • Cannot connect iPhone 7 more to iTunes because an invalid response from the device

    I tried to sync my phone to iTunes and I get an error message stating "invalid response from the device. I tried to remove the password, and it still doesn't work. I also tried using a new USB cord. I'm doing something wrong? I can't sync my music or ringtones. Will there be an update to iOS 10 soon to solve this problem? I am extremely disappointed that I can not connect my new phone!

    You use iTunes version 12.5?

    Get the latest version of iTunes - Apple Support

Maybe you are looking for

  • Why I see a yellow exclamation point symbol in the address bar?

    When visiting certain sites using Firefox Android, I get a yellow exclamation symbol in the left side of the address bar. For example in http://www.w3schools.com/html/html5_geolocation.aspWhy this is happening, there is no indication anywhere. Clicki

  • How to disable the change in App

    I don't know what to call this 'feature', just guessing. The behavior is: I want to move mail to the Safari. I look for slides Dock Safari and Safari in place. This is sometimes referred to as "barn door transition." The effect I see on my 2011 MacBo

  • Computer has a period when you do something

    I don't know how to describe it. But when I move my mouse, it makes small jumps, it is not smooth. Also, I watch videos, it's as if there is a slight delay, as everyone has a lisp and repeat things.* original title - my computer seems to have a hiccu

  • Speech recognition in Microsoft Word

    I just started using the Windows Vista built in the "Speech recognition" program and its working well except for one thing. I work everywhere (chat rooms, etc.) but not in my word processor (Microsoft Word, Microsoft Words or my internet Editor Tool)

  • Selecting a list item in a list view

    It is best to highlight a selected item or for a border around the element to appear (as I have noticed when I deploy my application)? )