9800 tilt - screen drawing problem?

I did a screen with custom graphics, it works perfectly normal up-side-face upward, however when I tilt the Simulator or even a real device to the left or right screen becomes white and no fields or graphics on the screen are displayed.

Interestingly, if I start the app when the Simulator is already left-coast-to the top then the screen is however as soon as I drew with the fields etc., tili unit right-side-up top, the same thing once again, a white screen. If I restart the device in the top left-side-up mode and tilt in top-side-to the top of the screen works in the high-side-to the top, but after the back passage to left-side-to top (the State that the application started first) again a white screen.

Does anyone else has met?

This is my custom screen (if it's useful)

package screens;

import java.util.Random;

import net.rim.device.api.system.Bitmap;
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.Graphics;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.container.VerticalFieldManager;

public class CustomLoadingScreen extends MainScreen {

    private VerticalFieldManager _container;
    //public int displayWidth = Display.getWidth();
    //public int displayHeight = Display.getHeight();
    public CustomLoadingScreen() {
        super( Manager.NO_VERTICAL_SCROLL | Manager.NO_VERTICAL_SCROLLBAR );

        VerticalFieldManager internalManager = new VerticalFieldManager( Manager.NO_VERTICAL_SCROLL | Manager.NO_VERTICAL_SCROLLBAR ) {

            public void paintBackground(Graphics g) {
                int[] bitArray = new int[36];
                int color1 = 0xFFFF00AA;
                int color2 = 0xFFBBCC00;
                int color3 = 0xFF12BBEE;

                for (int i = 0;i < bitArray.length; i += 3) {
                bitArray[i] = color1;
                bitArray[i + 1] = color2;
                bitArray[i + 2] = color3;
                }

                Bitmap image = new Bitmap(6, 6);
                image.setARGB(bitArray, 0, 6, 0, 0, 6, 6);
        g.drawBitmap(0,0,6,6,image, 0,0);
        g.setColor(0x3498CC);
        g.fillArc(0, 0, 100,100, 360, 360);
        super.paint(g);
            }

    protected void sublayout( int maxWidth, int maxHeight ) {
                    Field titleField = getMyTitleField();
                    int titleFieldHeight = 0;
                    if ( titleField != null ) {
                        titleFieldHeight = titleField.getHeight();
                  }

                super.sublayout( Display.getWidth(), Display.getHeight() - titleFieldHeight );
                setExtent( Display.getWidth(), Display.getHeight() - titleFieldHeight );
            }

        };
        _container = new VerticalFieldManager( Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR );
        internalManager.add( _container );
        super.add( internalManager );
    }

    public void add( Field field ) {
        _container.add( field );
    }

    private Field getMyTitleField() {
        Manager delegate = getDelegate();
        Field titleField = null;
        try {
            titleField = delegate.getField( 0 );
        }
        catch ( IndexOutOfBoundsException ioobe ) {

        }
        return titleField;
    }

}

You don't need to invalidate - the system redraws after a re-layout anyway.

What to use as values for width and height - only maxWidth and maxHeight spent in your sublayout are correct. getPreferredWidth and getPreferredHeight are still useless. getWidth() and getHeight() return the previous values, since you have not called setExtent with new values yet. Same problem with getVisibleWidth / getVisibleHeight. Oh and by the way, you cannot use correctly titleField.getHeight () at this point as well.

However, the irony is that you don't need all these shenanigans in your program. Instead of making your first the 'title' field, don't add it to the screen at all and just use setBanner / setTitle on it. You will be able to abandon this override of sublayout in total.

Read the following article in the knowledge base to greatly simplify your code:

Screen explained

Oops - just found another problematic piece of code: why any who call the super.paint inside paintBackground? Drop this last line, and you'll be much better off. It could well be the root of your problem.

Also - for efficiency, not to generate your image Bitmap every time by the paintBackground - do once in the constructor and use it whenever you need.

Tags: BlackBerry Developers

Similar Questions

  • Screen touch problems when you use the converter

    We just bought an Envy 27 tilt to our Caravan for all the good characteristics that HP has and TV

    Cause sometimes will want to run the HP converter 12v 400 watt true sine wave.

    We tried this to find a problem, the computer functioned well but the touchscreen ran a muck and did not work as usual.

    So after much googling and some reading I'd like here to answer fo HP.

    As I can't believe, I'd be the first to come on this problem and want to put it all in one in a motor home.

    What I read, it could be a matter of dirty power of the inveter, but we thought we have purchase the best brand true sine wave, we could leave our guys of battery here in Australia.

    Any advice would be received with gratitude.

    Thanks Lou, first of all for your time and on the other hand for your thoughts and advice.

    We have it finally working outside a performance of the inverter with number.

    But I have to say without any worthy of official telephone hotline support of HP.

    Lou, I'm working through several of your suggestions, pending the official response to my survey on what brand or type of UPS or UPS I should use with my desire to tilt.

    Well, it is very sad that a massive company like HP with what you would think would be a very large R & D service, cannot answer a simple question, like what type of UPS or UPS if they recommend to work with the touchscreen of the tilt.

    The poor people, I was talking to, had no idea what I was talking about, or what I was trying to do. How a computer call center peason knows not what a UPS, I can understand on an inverter, but the tech people, these are things really very similar in the different boxes.

    OK, if you have this problem with your inverter and touch screen, first of all not all inverters are equal even in the same brand that I discovered. I want to thank my provider inverter & battery for their time and for allowing me to put in place the HP Envy of tilt on the back of their store and try different UPSs, inverters and batteries.

    I'll talk about brands here, not rat on the brand, but as it may be useful to someone else in Australia in the future. It seems that my "Epower DCAC 400w 12v true sine inverter" wasn't at the height when it came to clean AC power required to operate the touch screen without problem.

    In the end, we tried a "Epower DCAC 1000w true Sine Wave 12v', really just to give it a go, thinking it would be a better to be the same brand as the unit of 400w, well it worked quite OK

    This unit of true sine wave Epower 12 v 1000w, fixed our problem with touchscreen and ran HP Envy tilt as if it is running on AC power.

    If anyone is interested for camper here, I found this configuration to draw between 4 and 5 amperes of batteries of 12v and about 41 Watts @ runing 240 volts a you tube clip.

    Well it is my experiences and the final result, I hope this helps someone else in the future, I'm sure that HP will not be able to.

    Thank you all.

  • [Aspire One] Tilt screen breaks webcam and USB

    I have a netbook Aspire One ZG5 with Windows XP Home edition.

    If I tilt/adjust the screen at all, I get two problems:

    (1) I heard the familiar sound of cutting something of a USB port, a USB icon appears in the system tray temporarily.  It is said there are 8 USB ports and one is broken.  My netbook has only 3 USB ports. I can't tell if something actually happens to USB devices when I do that.

    (2) if I use the CrystalEye webcam integrated with the Chrome browser, the webcam works until I restart the computer.

    The effect of usb is intermittent, but the webcam breaks every time.  And he always did those things.

    I can see the connection between the tilt screen and power management (to shut down the computer when the screen is completely folded down), but this link between the inclination of the screen and webcam and usb ports seems quite inexplicable to me.

    Advice to solve this problem?

    Thank you!

    There are two things you can do:

    1. Tilt the screen.  I know, I know... but it's an alternative to the #2.

    2. Contact technical support in your region for assistance with this hardware problem.
      Acer Service & support

    Honestly, it's a hardware problem that must be dealt with by the system service.

  • Satellite C70 - A - 16 L - screen resolution problem

    Hello

    I recently had a screen resolution problem with my laptop (C70 - A - 16 L).
    The max screen resolution which is imparted to me is 1366 x 768, whereas before I think he used 1600 x 900.

    I tried the latest drivers, Bios, etc. and have also restored the operating system to a previous backup, as well as a new installation.
    I also tried to roll back to Windows 7 (with proper drivers). They all offer the same problem.

    This new maximum resolution display correctly - as if the LCD does not deal with the timings of 1366 x 768.
    I believe that the Panel is OK and the problem he reports the EDID information properly - to force windows to use the new resolution.

    Is there a download monitor.inf file that can be used to bypass the EDID reported by the Panel?

    Kind regards

    Antwist.

    If the right to display drver is usually installed everything should be OK.
    Have you installed Intel driver Toshiba download page 9.17.10.3062 version?

  • blue screen "possible problem with SPCMDCON. SYS

    all about office went< only="" program="" available="" and="" showing="" is="" mcafee=""> bed blue screen "possible problem with SPCMDCON. SYS '.  Hard drive reads accurately but very little available. Get pop up of the AV PROTECTION ONLINE DECLARING PAY 59.95 AND we will solve the problem. also the problem States is due KEYLOGGER ZEUS, please help

    Hello

    1. are you able to boot to the desktop?

    If you are able to boot to the desktop, run the antivirus scan and then run the System File Checker.

    Step 1: First we will analyze the system for infections using the Microsoft Security Scanner which can be downloaded from the link below:
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Step 2: Use the (SFC.exe) System File Checker tool to determine which file is causing the problem and then replace the file. To do this, follow these steps:

    (a) open an elevated command prompt. To do this, click Start, click programs, accessories principally made, right-click Guest, and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click on allow.

    (b) type the following command and press ENTER:
    sfc/scannow
    The sfc/scannow command. analysis of all protected system files and replaces incorrect versions with appropriate Microsoft versions

    If you are not able to boot to the desktop, please start the system in safe mode and follow the steps mentioned above.

  • Screen resolution problem. Cannot set above 680 x 480.

    Screen resolution problem

    I have a dell latitude d630 2.5 GHz computer laptop under XP Professional 64-bit operating system.  The screen resolution will not be set above 680 x 480, and when I try to increase the computer stops with a black screen message that don't stay long enough onscreen to read.  Dell advised that they don't or support this machine with the XP operating system and that they have no drivers or other fixes for the problem.  I hope that you will be able to help and thank you.

    Hi dduck11,

    ·         What is the default screen of the laptop resolution?

    You need to update the graphics (video) drivers for the laptop. I see that there are Windows XP drivers available for the same thing. Download and install the updated drivers to see if it helps.

    Drivers & downloads for Latitude D630

  • screen reader problems

    When you open the Yahoo home page, we get a distorted display. At the top it says problems screen reader, with line click on "disable auto updated pages" I click on it and most of the time that it takes me to a good Yahoo home page screen. Problem though is that I have to do it every time. I have lost the ability to get a good Yahoo homepage screen and forced to work to do every time I open Yahoo.

    I'm not sharing my information or be shared I know.

    How can I fix this please?

    Yahoo questions, ask Yahoo Tech Support.

    Here: http://help.yahoo.com/l/us/yahoo/search/

    http://en.Wikipedia.org/wiki/Screen_reader

    A simple search help and Support produced this one.

    Internet Explorer features, such as multimedia or page transitions, can cause screen readers to give confusing or incorrect information. Follow the steps below to disable the features that might interfere with screen readers.

    To make Internet Explorer work better with screen readers

    1. Click to open Internet Explorer.

    2. Click Tools and then click Internet Options.

    3. Click the Advanced tab.

    4. Make one or more of the following changes:

      • Place the cursor to follow the development of the screen

        If you want your screen reader or your magnifying glass to use the cursor (also referred to as theinsertion point or system caret) to determine whether to read or expand, follow these steps:

        Under accessibility, select move the slider system according to focus/selection box.

      • The text to display in place of the images

        Under accessibility, select him always expand Alt text for images of the box. UnderMultimedia, clear the show picture check box.

      • Stop page transitions causing erratic behavior in your player screen or voice recognition

        Under browsing, clear the Enable page transitions you use smooth scrolling check boxes.

        Under multimedia, clear the show picture and game animations in the checkboxes of the Web pages.

      • Help prevent the sounds of the Web page to interfere with your screen reader.

        Under multimedia, clear sounds in webpages box.

    5. Click OK.

    HTH

    If I brought you joy, vote! If I answered your question, click, propose as answer! > WT

  • Screen resolution problems (Windows 10)

    I downloaded the latest trial 9 Captivate for Windows 10 and screen resolution problems. Basically, making the software unusable. A lot of screens and dialog boxes seems larger than the current window, they are in, making the right and downstairs parts invisible window (usually, this is where the 'OK' and 'Cancel' buttons for example).

    I'm Captivate on a laptop running 64-bit Windows 10 (Sony Vaio with an NVidia GT 640 M map graphic with the latest drivers)

    Does anyone know how to fix this? Here are some examples:

    captivate1.PNG

    captivate2.PNG

    captivate4.PNG

    No retina.

    What is the size of the police on? Win10, it is often larger than 100%, which is not really necessary for your resolution, but that's a retina display. I am using Captivate on Win10, but Surface Pro and laptop have a retina display.

  • BB Storm: Tilt screen problem

    Hello

    Purpose is to display a series of files bmp on screen of BB storm 9500 (to show that video). It works fine as long as I do not tilt the blackberry. Time as I tilt the device (while loop), it displays immediately stops and the last bmp file. As can be seen from the code, I've implemented it as singelton for only 1 instance of the BMPBuff class.

    public class BMPBuff extends MainScreen
    {
    private Bitmap img;
    private static BMPBuff instance;
    
    private BMPBuff() {
        BMPpThread pThread = new BMPpThread();
        pThread.start();
    }
    
    public static BMPBuff GetInstance(){
    
    synchronized (UiApplication.getUiApplication().getAppEventLock())       {
        if(instance == null){
            instance = new BMPBuff();
        }
        return instance;
      }
    }
    
    public class BMPpThread extends Thread
    {
        public void run() {
        int count;
    
        BMPPlayerBuffer bBuff = new BMPPlayerBuffer();
        for (count = 0; count < 300; count++)
        {
         img = bBuff.BMPImageArray[count];
         UiApplication.getUiApplication().invokeAndWait(new Runnable()
          {
            public void run()
            {
                invalidate(); //paint images in screen
            }
          });
        }
        }
    }
    
    protected void paint(Graphics graphics)
    {
      graphics.drawBitmap(0, 0, img.getWidth(), img.getHeight(), img, 0, 0);
    }
    }
    

    How I instantiate this class is,

    BMPBuff bScreen = BMPBuff.GetInstance ();
    pushScreen (bScreen);

    I've been expectiing it works fiine after implementing the Singelton. But does not work. Any ideas/help?

    I'm glad to hear that it worked! You can mark the issue as resolved?

    I don't think he had much to do with the orientation of the device in particular. As you said the same thing happened when you press the menu button. I think that other interactions of the interface user would be likely to cause the same problem with your original code.

    My guess is that he was blasting through the loop you cause only to see the last image. Have you seen an animation with your original code? It might also make sense special in the event queue, which throws events when certain UI interactions occur to keep sensitive things. To tell you the truth I don't know

    With respect to the correction of the attempt to singleton, who won't have an effect. For example, Android strives to save and re - create your current activity, and a singleton may have helped in this case. But I believe that BlackBerry leaves the process running and simply makes a new provision on the current screen.

  • BlackBerry Torch 9800 blackBerry smart phones problems

    Sorry guys, but I couldn't find the answers I can.

    In any case, RIM published an update on the so-called lock button on the top phones? I noticed this isn't only this model which is affected. I have heaps of times 'Pocket call' people, texts sent to people and remove apps because the button is so sensative that phone unlocked.

    Also having problems with the appworld keep crashing, this happens every time others.

    Last thing is that I noticed an update for the 9800, but does it include British customers. I checked the phone and he said: I'm updating.

    Thanks in advance

    Do not touch the button is all you need to do to stop unwanted calls and texts.  Unfortunately, it is the easiest thing so much the thing more difficult to do, all at once.

    If accidental pressure on the button there's a problem, I suggest putting your phone in a Holster.  In doing so, the magnets in the case will be aligned with the inner workings of the phone and will stop at your screen, essentially to put your phone to sleep.  (Note that this is applicable only if the case is specially designed for your phone model, i.e. do not try to use a "BOLD" case on a torch.)  It is impossible to access the phone while it is in the case, thus making the accidental presses of the lock button a thing of the past.

    I hope that helps you.

  • App - small on screen drawing space?

    Hello, I wrote a drawing application. All over the screen is used as the design with the exception of a small area at the bottom of the screen and a small area on the side of the screen. These small areas contain buttons for the different options in my application.

    I'm a little confused about the uses and what exactly these sweeping gestures are leaving the app, minimize application etc... I want to know if there's a chance that when the user is "drag" his finger draw the app will be released because a gesture of exit app event will be dispatched.

    There are some areas that I should turn off the drawing canvas?

    BONE scan gestures are recognized on the bezel (not the screen).

    You should be able to use the entire screen without any problems.

  • PowerBook G4 aluminum screen rendering problems

    Hello. I use an old PowerBook G4 aluminum 15 " only for some older programs that I still have, the specs are 1.33 GHz, 1 GB DDR SDRAM, an A1095 model (I think). It is currently running OS 10.4.11 Tiger.

    I am having some problems with the rendering of images, windows and icons on the screen. Sometimes, say if there is a background image, there will be pixels of a pure purple and light green color and other parts of these colors in pants plates, which will fade in-and-out in intensity. There will be a purple halo around the icons on the desktop, windows will have their underlined by violet title bar and the window itself will be celebrating also in purple. When I move these icons and windows, the outline of color moves with him - even for images with these pants patches. If I try to take a screenshot, it looks like it has taken to this effect, but when the screen goes back to normal, the images do not show fading.

    There is also a kind of shear horizontal wind that comes and goes, like a Photoshop effect, which seems to affect the whole screen - but it was did not so lately, moreso just the pants colors. The effect of shear wind or rosacea are affected by the position of the screen.

    These are intermittent problems that come and go, sometimes they may not arrive for a few hours or a few days, and sometimes they keep coming back and to stay - they also vary in intensity, sometimes just annoying, other times made the screen so bad that I have to do a hard shutdown with the power button.

    I have connected this laptop to a LED TV (via a HDMI DVI cable) when I had these patches scrambled on the computer laptop screen - and the TV screen shows very well, without tasks.

    After asking some Apple technicians, they thought it could be anything from:

    -l' screen is gone - but why would move fading when I move the images/icons/windows?

    -a bad laptop screen cable

    -video card - but she restores the fine screen image when connected to a TV?

    -memory on the logic board

    -poorly seated RAM (which I've deleted and reinstalled several times with the same results)

    Or a combination of these. They say this isn't a problem with HD.

    I understand that it is an old computer and an old technology, but I would still go back to normal, as everything else works fine. I know a guy who can replace the screen and the cable, as it seems a little tricky for me to do would not touch the video card. I'm wary about this fact, because it may be other things that causes this problem.

    In addition, the graphics card is an ATI Mobility Radeon 9700, model: ATY, RV360M11 - if it helps.

    Any ideas - thanks. (Please keep it relatively simple, if possible)

    As the connected HDTV does not have this effect, the problem is likely related to the PowerBook's display hardware.  If the problem was related to the graphics card (and 'upstream' material) or due to a software problem, waiting for HDTV to show the same effect at a time when the PowerBook display is the effect.

    You can try to do a reset PMU (power management)

    Resetting PowerBook and iBook Power Management Unit (PMU) - Apple Support

    and that he may as well do a LANDAU ('NVRAM') reset too (although less likely to cause described problem)

    How to reset the NVRAM on your Mac - Apple Support

  • Flickering screen-SERIOUS problem!

    iMAC 2007 ElCapitan 10.11.6. Trouble with the dreaded color wheel. Clean uninstalled my Mac. Don't seem to be able to start Apple Hardware Test. Make a backup last night. Now the screen continuously flickering/reload. Help please!

    Please post a report of EtreCheckof your system. We then look for obvious problems. Please click on the link, download the application and run the report. Once you have the report, please copy and paste into your response to this post.

    If you would like more information on what is EtreCheck, just click on the link and you will find a description of the application.

  • iPhone 6 s screen Passcode problem

    I just upgraded to a 6 s iPhone and the phone is really nice, a lot of improvements over my 5s.

    The only problem that I see is after I lock the phone (switch top right) and then later hit the HOME button, the screen access code flashes by briefly and I find myself at the level of the 'office' with my app icons.

    What happened to the password screen?

    Is there a parameter with a 6s phone I have to configure?  I have indeed a setup password on this phone, but the phone open again by bypassing it.

    I have experienced of her 'wake up' the phone using the lock button on the side, and it lets you slide to unlock and show the password in the screen, so it works. But hit the HOME button to wake up the phone and bypasses the security password screen.

    The phone OS is also updated.

    Any help or suggestion?

    Thank you!

    You press the HOME button with a finger that is registered with Touch ID, that opens the phone. Try pressing it with a pencil eraser.

  • Black screen / display problems

    I have a MBPR13"(early 2015) which I think has integrated graphics intel 6100.

    I've been running windows via bootcamp on the mac since I bought it, first with win8.1 and for a year or two, win10. A couple of weeks, however, windows crashed and wouldn't start. I can boot into safe mode after 3 failed attempts at normal mode, but I couldn't diagnose the problem. I took the opportunity to carry out a complete new installation of OSX and Windows 10.

    However, while OSX continues to work very well, Windows 10 still will not work. It installs successfully, and then gets to the point where the wizard Bootcamp installs all the drivers - it seems to be ok until that display then goes off - I guess that's the point where the display drivers are installed. Windows is still underway, but all I get is a white screen.

    After much mucking to plug and unplug the screens I can sometimes get an image on an external monitor or on the built-in screen. The computer screen does not fill the screen (bottom 25% of the screen remains empty) and windows cannot detect both screens at the same time. In any case, in a few seconds to lift an image on the screen, windows crashes and restarts.

    I suspect that it is a driver problem, probably related to a recent windows update - note my new installation is based on the current windows (as of today ' hui) 10 ISO download available from microsoft, so I guess this includes all applicable updates and I have no way to drive to a previous version.

    Can someone from apple what comments can you do on this point, hopefully identify that it's just a driver problem and update the bootcamp windows software support for my MBP so I can get Windows successfully facing up and running? Otherwise, any other suggestions on a fix?

    Thanks in advance

    Mike

    Updated - uninstall the display driver Intel 6100 temporarily solves the problem (of a point - the works of laptop display once again, but of course without hardware acceleration or connectivity external monitor), although 10 windows automatically reinstalls the drivers a few seconds later, resulting in the return of the issue.

    I was able to continue to use the laptop only by disabling the graphics card. However this clearly is not a solution, but simply points to the fact that the display driver is the issue.

    Everything apple comments? Surely, this affects a lot of users and not just me? Is an update to the driver on the way?

Maybe you are looking for

  • Cannot change connection settings

    Firefox 34.0 (Waterfox actually) after the new update doesn't let me save the connection settings. The radio of the proxy used to be on no proxy; I deleted prefs.js and now it is stuck on the proxy for the use system settings. Now the no proxy for fi

  • howtodeletesongs

    I'm new to ipod and want to get it answered

  • Coffee spilled on the magic keyboard

    Hi guys, I recently spilled some coffee on my keyboard magic and tried my best to remove it... The day after that, I tried to use it to see if it worked correctly and he realized that some of the keys are not working... Is there a way I could solve t

  • Pavilion s5-1015uk: the upgrade of processor

    Tried to upgrade the CPU on my desk of slimline s5-1015uk Pavilion to an i7 - 2600K quad core CPU. The HP support document has stated that the Cupertino would a QuadCore i7-2xxx - but the pc gave the message that island cpu is not recognized and set

  • Error code: 80070490

    Error code: 80070490