How do I refresh the page on the orientation using Blackberry 9800 "BOLD" change

Hello everyone,

I'm working on an application in which I use both portrait and landscape. But the problem is that if I start the application in profile mode then it adjusts the image according to the style of portrait but I change mobile orientation in landscape mode on the screen even Conversely it will not change in size and based on this image... Like the following picture:

Although I usinng such formula for resize and I have these images based on different sizes, but it is not updated. Kindly tell me how I can do it.

final _backgroundBitmap Bitmap = Bitmap.getBitmapResource (Display.getWidth () + "x" + Display.getHeight () + ".png");

for example 480x240.png, 640x360.png

VerticalFieldManager CurvedSquareImage = VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH | nouveau VerticalFieldManager.USE_ALL_HEIGHT)
{
protected void sublayout (int mWidth, int mHeight)
{

Super.sublayout (Display.getWidth (), Display.getHeight ());
setExtent (Display.getWidth (), Display.getHeight ());

}
public void paint (Graphics graphics)
{
graphics.drawBitmap (0, 0, mWidth, mHeight, _backgroundBitmap, 0, 0);
Super.Paint (Graphics);
}

};

Thanks in advance.

I keep seeing this code, I would like to know where it comes from:

protected void sublayout (int mWidth, int mHeight)
{

Super.sublayout (Display.getWidth (), Display.getHeight ());
setExtent (Display.getWidth (), Display.getHeight ());

}

This sublayout() is not correct for two reasons:

(a) If you want to limit the height and width of the Manager, you must make sure that your Manager is already limited to something less that what you try.  So, you should do something like:

Super.sublayout ((Display.getWidth (), mWidth) Math.min Math.min (Display.getHeight (), mHeight));

In this case, it seems you have the toolbar at the top, likely in the area of title or the banner of a screen, and so you have in fact the entire height of the screen in any case.

(b) If you ask a Manager to ask, then you should respect the size it uses.  If you force a size using

setExtent (Display.getWidth (), Display.getHeight ());

then you have potentially confused it because he thinks he has the size, he asked, and actually require you to use a different size.

Please correct that code and correct whenever you use it.

I recommend you round eye for documentation and examples for managers to understand how you use one before you start the substitution of methods.  I particularly recommend that consult you this:

http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644

because it will help you understand how to tell a Manager to use all of the space available to it.

Now to your problem.

On the reorientation, sublayout for your handler will be called, so he will have to choose the correct image.  Now, if you change the image in the layout, you actually ask the device to the new layout in the layout, and he tells you that he cannot do it - it will throw an exception.  It must be so, in sublayout, use the code as follows:

UiApplication.getUiApplication () .invokeLater (new Runnable() {}

public void run() {}

update the bitmap here

}

});

What this will do is update the image and the update will force another layout of all fields - in other words sublayout will be called again, but this time with the right image.

Because sublayout will be called once again, you must be sure that you start the update of the Bitmap again.  So what I do usually is an indicator that specifies the orientation that I expect, and if it changes, set it to the new orientation and pitch upgrades required due to the change.

Put logging statements in your code to sublayout to make sure that you are having problems of infinite loop in there.

Tags: BlackBerry Developers

Similar Questions

  • How we can refresh a page if a date is entered in a date picker

    Hello

    How we can refresh a page, if a date is entered in a date picker, as the selection with option mailing list where the page

    is automatically updated.

    TJ

    TJ,

    Use the Onchange event to call a function doSubmit javascript to refresh the page. Change the date picker control element and the attributes of the element in HTML Form code
    onChange = "doSubmit (); »

    Thank you
    Manish

  • How can I get the airplay icon to appear? Changing the settings of firewall does not work

    How can I get the airplay icon to appear? Changing the settings of firewall does not work

    Hello Drjoe378,

    I understand that you do not see the AirPlay icon in iTunes on your Mac. If you have verified that your firewall is disabled or that the problem occurs regardless of the status of your firewall, there is a little more that can help return your ability to connect to AirPlay devices.

    1. Make sure you have the latest version of iTunes and Apple TV software.
    2. Connect your computer and other devices on the same network Wi - Fi. If you are using Ethernet, connect the two devices on the same router or hub. If you use the Wi - Fi and Ethernet, plug your device AirPlay the same router that your computer uses for Wi - Fi.
    3. Restart your computer, device AirPlay and network router.
    4. Because some Airplay devices include a power switch for AirPlay option, look for the option in the settings and make sure that the feature is enabled. Refer to the user guide of the device for more information.

    Use AirPlay to stream content from iTunes on your computer wireless
    https://support.Apple.com/en-us/HT202809

    All my best.

  • How can I make the best use of a new external hard drive and a new catalog full of photos just loaded into Photoshop elements 14 Organizer?

    How can I make the best use of a new external hard drive and a new catalog full of photos just loaded into Photoshop elements 14 Organizer?

    Keep all the files on external hard drive image?  Nothing else and no pictures on the desktop?

    Keep all image files both places?

    What is the best way to go through thousands of images in the Organizer to identify and place them in files?

    Once I've placed a file, I just leave it in the entire catalog or a way indicate to me that it has been sorted?

    As overwhelming, any tips/shortcuts/schemes, you can offer are welcome!

    As I only have the version of the EP, here is some info on the organiser:

    https://helpx.Adobe.com/Photoshop-elements/how-to/use-elements-Organizer.html

    Independent of how this feature works, you want to have your photos in one place and have a backup (second copy) somewhere else. All hard drives will not be successful at some point - some more early, some late - never trust to have your files in any safety devices if they are on a single disc. Once you have your sorted, it would be useful that you will organize/name/tag new photos immediately if the task is relatively short and simple. I copy my photos on my internal hard drive for my camera, take a quick look with preview to see who needs some changes and then decide where to put them - either drop them immediately after naming them or bring in an editing application and then file them away.

  • How to communicate with the gsm using lab view

    Please, someone tell me about the following uncertainties:

    1 can anyone tell me about the GSM part in lab mode?

    2. how to communicate with the GSM using lab view?

    3. how to publish my data through GSM using lab view?

    4. how to use ipod to send data to laboratory?

    5. what a DAC suitable for ipod?

    6. how to install the lab for ipod DAC mode?

    without worrying

    FR. mohammad rehan

    rehan_the_great wrote:

    Can u please tell me the minimum requirement of computer (labtop) for the use of labview, like ram size, HARD drive, map chart etc...

    A simple search for "labview requirements" on this site would have given you the information you want.

    http://www.NI.com/LabVIEW/requirements/

  • How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    Hi all

    How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    There is also a checkbox on the dialog box 'Sign' to lock document after signing.

  • How can I get the 'handles' using the Radial filter in Lightroom 6

    How can I get the 'handles' using the Radial filter in Lightroom 6

    Please press 'H' as advised by dj_paige.

  • How do you refresh a page

    How do you refresh a page?

    Al

    Hi albertreeder,

    Greetings!

    If you are looking to refresh a Web page that's Ctrl + R (F5 shortcut key) under windows and Cmd + R on Mac.

    Concerning

    Jitendra

  • How can I fill the records using the value LOV

    Create a form based on the use of the following output Table EMP

    Create a database block IE control-> Dept No. block


    Create a database block - EMP
    Create a LOV to the Dept not according to the dept table.
    For the current No. Dept. Complete records of the employees

    How can I fill the records using the value LOV?


    Thank you

    Hello

    Create trigger KEY-LISTVAL for control_block.dept_no with code similar to the following:

    IF SHOW_LOV ('LOV_NAME') THEN
            SET_BLOCK_PROPERTY ('EMP_BLOCK', DEFAULT_WHERE, 'DEPT_NO = ' || :CONTROL_BLOCK.DEPT_NO);
         GO_BLOCK ('EMP_BLOCK');
         EXECUTE_QUERY;
    END IF;
    

    Hope this helps

    Best regards

    Arif Khadas

  • How do I refresh a page on Internet Explorer

    I need to refresh my page on IE after login to NASCAR before I can connect to NASCAR Raceview Audio... There is no button refresh IE.  How do we install a refreshment to sleep Explorer.  The laptop that I use doesn't have a F5 key to make a shift ctrl F5, that does not work.  I tried all the options I found on support - nothing works.

    Highlight the URL and press 'Enter' or reset your web browser!

  • How can I stop the process using the trigger Disqualification?

    How can I stop and start the process using triggers in Disqualification?  While planning a job, I can not able to see the folder of trigger / trigger name in the tool palette? What kind of file should be placed in the Triggers folder. If you know someone, let me know. If someone has shared an example script which is very useful for me.

    Thanks in advance.

    Malila Chandra.

    It is a common use case.

    You create a job that has a closed Web Services trigger configured before executing the first phase (right click on the stage in the Task Manager, select Configure, you will then see this screen below), with the work or or jobs you need to added stop. This must be configured to be 'blocking', i.e. the rest of the work expected on the triggering comprehensive action.

    Work should have a phase which refreshes the data staging, and another phase (or a phase of post trigger) that returns your work in normal real time (using the trigger on the job).

  • Refresh the zone using dynamic action

    Hello

    I have a page in my application with two different regions. First region has a selection list and second region has a report and the report query uses the value of the selection as a variable binding list.

    I created a dynamic action to refresh the report region when the value of the selection list is changed.

    It works very well and the report is updated after changing the value, but once the updated report of State lines are different.

    When I move the mouse over the lines, the background color changes and when I move the mouse from the line, it does not scale to the original color.

    Is this a bug?

    Thank you
    Machaan

    Hi Machaan,

    good news, the problem reproduced no more on APEX 4.0.2 which will be our next group of hotfixes.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • How do I open the browser web blackberry with a url given by a click of a button.

    Hi all

    I'm developing an application in which I want to open the browser web blackberry with a URL given using a click of a button. How can I do that. I use this code inside the earpiece button

    ' Public Sub fieldChanged (field field, int context) {}
    TODO self-generating method stub
    Private private = Browser.getDefaultSession ();
    browserSession.displayPage ("http://www.google.com");
    }

    What is a good way to do this? Please help me...

    Yes

  • How to get to the event log in the simulator of blackberry 9800

    Can someone tell me how I could see the event log in the blackberry Simulator

    Plugin Eclipse - 3.5

    Version BlackBerry java sdk - 6.0.0.29

    Simulator model - 9800

    There is an option in tools - see the event log, but it shows

    0:08:13.659: LED: off
    0:08:16.862: LED: on (0x003f0000)
    0:08:17.034: LED: off
    0:08:20.112: LED: on (0x003f0000)
    0:08:20.284: LED: off
    0:08:23.487: LED: on (0x003f0000)
    0:08:23.658: LED: off

    Help me??

    Well, I just shot to the top of my Simulator of 9800 and it worked perfectly.

    Hold down the ALT key enter L, G, then L, then G

    Here, to the event log

  • BlackBerry Smartphones Basic Question backup - how to respond to the choices on BlackBerry?

    When I plug the USB cable into my "BOLD" and it connects to my PC, I get a box of dialogue on the "BOLD" that says "Blackberry is plugged" and he gives me three choices: 1. USB Drive 2. The Media Sync or Charge only 3.  I have never known to choose because I want to do is to back up my BlackBerry with Desktop Manager, so I usually just ignore the dialog box.

    That is what I'm supposed to do?  Or choose one of the three choices each time?

    Sorry for the stupid question - but I never knew how to deal with this.  I have a Bold 9900 running 7.1.0.284 and Office Manager 6.1.0.36.

    Nels56 wrote:

    When I plug the USB cable into my "BOLD" and it connects to my PC, I get a box of dialogue on the "BOLD" that says "Blackberry is plugged" and he gives me three choices: 1 USB key 2. The Media Sync or Charge only 3.  I have never known to choose because I want to do is to back up my BlackBerry with Desktop Manager, so I usually just ignore the dialog box.

    In fact, it is not really important, but it works.

Maybe you are looking for

  • Weird problems when you use Word 2000

    Several strange with Word 2000 - the cursor events suddenly jumps a line or two or a form letter one and three appear, or next page results in the racing at the end and again very document, today I hit remove to delete a word in the middle of a doc o

  • The Toshiba e-store account reset - 3949

    can you please reset my account for the number of the virtual store is "3949. Thank you

  • ProBook 6560 b: battery time

    The bateria of mi Laptop "ProBook 6560 b" are solo lasted 15 minutes. If compro the bateria of cartridges; cuanto seria Duración average of the nueva bateria?

  • Automatic download occurs on-screen connection for XP Pro. Help!

    In my class, we use Windows XP Pro and I have a program installed to catch all downloads in a buffer (Norton Autoback). The buffer fills the log on screen after an hour or two, thats why something is automatically downloading, but I have all autodown

  • Question of Vostro 230 s

    Hello everyone, I have an Inspiron 531 s which is about 5 years old.and it's XP. I simply don't have the money to switch to Win 7 so I'm looking for a good used Dell with 7 is already installed, and I'll just transfer my stuff on to the new computer.