Set the orientation of the device BB10

I have an application in which the main element on the screen is a component textarea. For portrait mode, the number of lines is set at 9 and everything seems smooth. But for the landscape mode, 9 lines is too much. I need to set this property to 2. To this end, I tried to use smth like this:




But in the ripple, in addition to Microsoft device emulator emulator, I get X 2 regardless of the direction I choose. What I am doing wrong?

P.S. I'm new to WebWorks, sorry...

Window.onorientationchange is an event that is fired when the unit enters the portrait-> landscape or vice versa

Something simple that works...

var x = 0;

window.onorientationchange = function() {
  // Are we in Landscape mode?
  if(window.innerWidth > window.innerHeight) {
    x = 2;
  } else {
    x = 9;
  }

// Do something with x here

}

window.innerWidth / height returns the width + height of the browser.

If the width is greater than height, you are in landscape mode

Its helpful to test the landscape rather than portrait as a Q10 has only portrait mode (720 x 720)

Tags: BlackBerry Developers

Similar Questions

  • Can any can give Live or online app Development on QNX IDE support and setting the goal as device Bb10. run the application etc?

    Can any can give Live or online app Development on QNX IDE support and setting the goal as device Bb10. run the application etc?

    The best way is to start basic: https://developer.blackberry.com/cascades/documentation/getting_started/index.html

  • Definition of the orientation of the device

    Hello

    How do you define the orientation of the device in PlayBook?

    If I try it is the only direction I can use (landscape left, all others interrupt the program):

    CCDirector::sharedDirector()->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
    

    You can set in the descriptor bar if you only set a direction for your application.

      true
      landscape
    

    See you soon,.

    Jon

  • iPad is set to optimize the storage of photos from device. App Photoshop Express will edit the reduced size copy stored on the device, or automatically process the iCloud kept a life-size?

    Can someone advise please?  I copy all my photos from SD card in my iPad and the use of the Photoshop Express application to modify.  iPad is set to optimize the storage of photos from device. Edit app Photoshop Express small size kept on the device, copy or automatically will process the iCloud a life-size?

    I guess you'll have to manually lower the file full resolution first. I would ' t think that any application would just go and take it automatically from the Cloud. You may need to check if you have not already.

  • Hello, my Mac Mini was stolen before that I could save it to find my iPhone service.  Is it possible to set up another computer or device so I can find it? I have the serial number and and more.

    Hello, my Mac Mini was stolen before that I could save it to find my iPhone service.  Is it possible to set up another computer or device so I can find it? I still have the serial number and and other information.

    Nope

  • Is it possible to set the time on a device in real time so that the time will persist when the device is not powered?

    It seems that you can not set the time on a device sbRIO (9606) and have always the exact time when the card is powered after not being fed for a while.  I have a product which will be independent (not connected to a network) when it is supplied by the customer.  I would like to collect data in a datalog and would like to put a timestamp somewhere so that I can understand when these data were collected.  If I can't get an exact date/time, then the next best solution would be to set up my datalogs so that I can at least understand the exact order in which they were collected.  (I think I can understand it without much problem)    Any suggestions as to best practices?

    Hey John,

    Without connected VBat time will not be preserved between periods of closure. Unfortunately for the 9605 and 9606 we have not a way to date the connector 9693 VBat.

    How much sbRIOs you plan to deploy with your system?  9623 and 9626 have a compartment for the RTC. If you haven't bought your sbRIOs already you could focus on the options of the form always match.

    If it is necessary to have retention time between stops, we would need to understand the extent of your application more.

  • an alarm can be set to control an external device using the digital output?

    My employer is considering buying a 6210 DAQ and SignalExpress (we currently use a branded DATAQ device).

    Looks like I can use the alarm function SignalExpress to define a logic high or low line, controlling a SSR to stop a pump (a non-critical application).

    Can I use SignalExpress in this way?

    I know LabView can do, but there is no way that the company appears for him.

    Thank you.

    Hi Jack, this is Paul with Applications Engineering at National Instruments.

    SignalExpress supports the functionality you want.

    «Once you have configured your signal to acquire you can go to "Save Options" > "Alarms" and then set the alarm conditions, and then choose your Action to alarm as «Defining the digital line»»

    I've attached a screenshot of the example of this configuration.

    Note here that I put it down when the alarm turned on.  You there are other options, including a rocker.

    Let us know if you have any other questions!

    Paul

  • When I change the setting by LabVIEW on my device, I see change on the monitor of the device?

    When I change the setting by LabVIEW on my device, I see change on the monitor of the device?

    This question should be addressed to the manufacturer of the device. From your previous posts, I guess you use GPIB or serial. If the unit has received the order, the manufacturer should be able to tell if no indicators on the device to update when the order is received. Based on my experience, however, the device indicators will most likely update on receipt of an order successfully.

  • How to set the parameters of "Configuration ThinPro" via the HP Device Manager

    Hello

    Maybe I'm blind, but how can I set the settings in "Setup ThinPro', accessible from

    ThinPro Control Center-->

    Control Panel-->

    Setup-->

    Configuration ThinPro

    through the HP Device Manager? These parameters allows to use a very strict kiosk mode, which we want to deploy. So far I found just to solve this problem through a complete picture, but this isn't a solution for me.

    I hope that I have forget something or you have another clue.

    Concerning

    Looks like there is no direct way via the HP Device Manager. Now, I manually configure a thin Client and save the registry.xml that I can ride with other devices.

    Concerning

  • You need to set the drive letter to the USB Ports front before any device has been inserted - that won't change when the device is connected. I have Windows XP Professional with Visual Studio 6 installed

    You need to set the drive letter to the USB Ports front before any device has been inserted - that won't change when the device is connected. I have Windows XP Professional with Visual Studio 6 installed. Thanks for your help

    diana73,

    First of all, make sure that you're connected Administrators account to do.

    How to change a drive letter to change an existing drive letter on a drive, on a partition, or a volume, follow these steps:

    1. Sign in as an administrator or as a member of the Administrators group.
    2. Click Start , click run and type compmgmt.msc .
    3. In the left pane, and then click disk management .
    4. Right click on the drive, the partition, the logical drive or volume that you want to assign a drive letter to and then click change drive letter and paths .
    5. Click change .
    6. Click assign the following drive letter if it is not already selected, click the drive letter that you want to use, and then click OK .
    7. Click Yes when you are prompted to confirm the drive letter change.

    The letter of the drive, partition, or volume that you specified is changed, and the new drive letter is displayed in the appropriate drive, partition, or volume in the disk management tool.

    Good luck! Please rate me upward if you find my post helpful. Thank you!

  • Network discovery, file sharing settings keep changing by itself and Alltel to set the network location continues to ask the wireless device

    former title: network location settings. Discovery of NW. File sharing. public folder sharing. AVG 9.0 'tools' and network connections.

    My Alltel Wireless device again set the network location. And continues to change my network settings for the discovery of NW to:, as well as file sharing for: file public and sharing: read-only.  I have AVG Security 9.0 and under 'tools' and connections network shows several svchost with States reading service connections listening and unknown. I don't want no access to my computer and cannot find any computer consultants who can get this to stop. What can I do?

    Hello
     
    1. the options apply automatically on?
    2. have you made changes on the computer recently?
    3. have you installed any Alltel Wireless application to manage network connections?
    4. What is the current network location type on? Is it home, work or public?
    Network discovery and file sharing settings depend on the network location. For examle, if you set the network as a public location it turn on file sharing.  So I would ask you to turn all the parameters and then choose the type of network and check if the parameters change again.

    Method 1.
    I recommend you to check if the problem exists in clean boot. May be a third party application is causing these changes.
    See the article below for instructions on how to start your computer in a clean boot state.
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: When the diagnosis is complete, don't forget to reset your computer to normal startup. Follow step 7 in the above article.
     
    Method 2.
    Also check the settings under tools in AVG security suite. You may need to check with the help of AVG on it.
    Or you can disable the antivirus software and check if that causes this behavior.
    Temporarily disable the security software installed on the computer and check if the problem persists.
    Disable the anti-virus software
    http://Windows.Microsoft.com/en-us/Windows7/disable-antivirus-software
    Important note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How to set the headset as default playback device

    When I got my headphones plugged, I can hear some things through them. How to make it ALL coming through my headphones when it is plugged?

    If I use Skype he will feed only Skype through my headphones.  If I try to watch a movie or play something else with the audio through my headphone the sound through my speakers.  I want that all THE sounds coming through my headphones when I plugged it in.  Any help?

    Hello
     

    This occurs when you have external speakers, by default. We need to put the headset as default.
    Exercise the functions mentioned below to set the headphones as default:
    1. go to Start and click on Control Panel .
    2. click on her, then a new window will open.
    3. in the new window click on the "Playback" tab and right-click in the window and click onShow disabled devices.
    4. now check if headphone is listed there and right-click on it and choose activate.
    5. Select the headset and click on "as default'.»»
     
    For more information, refer to tips to solve common sound problems. 
     
    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Unable to set the display resolution, Intel HD 4600 in Device Manager displays ' generic non-pnp monitor low resolution.

    I am slot as Windows 7 Pro on a Dell Intel 64 bit pc with a screen HD Dell I5 and Intel HD graphics 4600 driver.  PC woke up a few hours of inactivity, after no updates known to windows or other programs, with icons and pages double size beyond the limits of the monitor, setting the low resolution and Device Manager showing ' no generic pnp monitor low resolution ' instead of 'Monitor Dell HD' and no option to increase the resolution.  No help with reset, not restoration, disconnection and reconnection monitor auto plug n Play, 'Search new device', 'add a device', update of the graphics driver, reinstall the drivers from the Dell monitor.  Troubleshooting peripheral reported to date and working correctly.  After I finally uninstalled driver restarted, and graphic displays "default monitor" Device Manager (no longer "generic low resolution"), no graphics driver identified, but don't allow me to change to a higher resolution.  New windows had to be individually size / expanded to fill the screen.  This can be corrected?  I want to optimize my display settings for this monitor.  I have reinstall my graphics driver or just be happy that I can use my computer?  Thank you.

    Call Dell.  Your monitor should have a 3-year warranty.  Your matching OptiPlex with a warranty of one year more.

    Also, check all the hidden and invisible buttons on the monitor.  Someone may have inadvertently changed one of these.

  • External BB10 Webworks/Cordova opening HTML pages on the device: "this file is not found. Check the URL and try again. »

    Hello fellow people,.

    IM quite in my application of Cordova/Webworks which downloads and save an html file in the SD (blackberry.io.sharedFolder).

    At this point, the config.xml file is defined as:

    read_device_identifying_informationermit >

    access_sharedermit >

    ermissions >

    Now, I'm trying to open the downloaded html that is saved to file:

    /Accounts/1000/removable/SDCard/MainFolder/subfolder/file.html

    My webapp, I try to open as: window.open (path, _self);

    Where path is the file above (which exists on the device!)

    Path is also, with the blackberry.io.SharedFolder + "/ MainFolder/SubFolder/file.html".< of="" that="">

    Also, I get the error:

    This file is not found. Check the URL and try again. If the URL is correct, check that your card is correctly inserted on your device.

    I am running and development off the BB10 Simulator.

    The console does not throw any error that I see.

    Any help or advice would be appreciated.

    See you soon,.

    @varunasingh

    Well, this is awkward.

    I have myself fixed by adding the string: "file://" on my road.

    I hope that others see it until they are too uptight.

    This has been resolved. Thanks for reading.

  • From an application at startup of the device for BB10

    Hello

    I was creating a demand for BB10.

    The application should start at the start of the device and (preferably) stay in the background.

    I found this http://developer.blackberry.com/html5/documentation/rim_background_element_1265316_11.html , but it doesn't seem to be something similar to this for BB10. Is there such a feature which is flush on BB10? or does perform a work around that.

    Thanks in advance,

    Prashanth

    This is true even if they said in Amsterdam that they are seeking to add this service in the future

    Unfortunately at the moment you're out of luck

Maybe you are looking for