setColor and drawText-> color remains black on bold 9700

OK, here's the story:

I have a custom listfield on which I draw text and have a custom color for a selected line. Change the color for the text of drawtext and then first caller setcolor. That normally works, well, it works in all simulators.

However, some users of the application are complained that they could not see the text. And here's the thing: the background is black and apparently the setcolor doesn't work for the drawtext, however, it works for the drawFilledPath function...

If it works perfectly on all simulators, but 9700 "BOLD" users are complaining about this... Is attached a print screen, black space down and toward the top of the selected line also contains data. If the user is going up or down the next selected EEG...

And here is an example of the code (not fully working, but it includes all the parts included drawing):

public class ServermonitorStart extends MainScreen {

    ListCallback _callback = new ListCallback();
    private CustomListField _listField = new CustomListField();

  public ServermonitorStart() {

      vfm = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH | VerticalFieldManager.USE_ALL_HEIGHT | Manager.VERTICAL_SCROLL) {

          protected void paint(Graphics graphics) {

              graphics.setBackgroundColor(Color.BLACK);
              graphics.clear();

              graphics.setColor(Color.WHITE);

            updateLayout();

              subpaint(graphics);
          }

        };

        verticalFieldManagerr = new
        VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH |
        VerticalFieldManager.USE_ALL_HEIGHT |  Manager.VERTICAL_SCROLL)
        {
            public void paint(Graphics graphics)
            {
                //graphics.setBackgroundColor(Color.BLACK);
                graphics.clear();

                graphics.setColor(Color.WHITE);

                super.paint(graphics);
            }
        };

        _listField.setEmptyString("No servers yet", DrawStyle.HCENTER | DrawStyle.VCENTER);

        _listField.setCallback(_callback);
        verticalFieldManagerr.add(_listField);

        vfm.add(verticalFieldManagerr);

        this.add(vfm);

  }

    private class ListCallback implements ListFieldCallback
    {
        public void drawListRow(ListField list, Graphics g, int index, int y, int w)
        {
            ClassDataListField dataToDraw = (ClassDataListField) this.get(list, index);
            g.setColor(Color.WHITE);
            g.drawText(dataToDraw._data_name, 5, y, 0, w); 

            if(do_colorcoding) {
                if(dataToDraw._data_status.toLowerCase().equals("offline")) {
                    g.setColor(0xFF5F5F);
                } else if(dataToDraw._data_status.toLowerCase().equals("online")) {
                    g.setColor(0x37DF4E);
                }
            }

            g.drawText(dataToDraw._data_status, 0, y, DrawStyle.RIGHT, w);
        }
        public Object get(ListField list, int index)
        {
            return _listElements.elementAt(index);
        }
        public int indexOfList(ListField list, String prefix, int string)
        {
            return _listElements.indexOf(prefix, string);
        }
        public int getPreferredWidth(ListField list)
        {
            return Display.getWidth();
        } 

    }

    public void paint(Graphics graphics) {

            int width = Display.getWidth();
            XYRect redrawRect = graphics.getClippingRect();
            int rowHeight = getRowHeight();
            int curSelected;
            if (hasFocus) {
                curSelected = getSelectedIndex();
            } else {
                curSelected = -1;
            }
            int startLine = redrawRect.y / rowHeight;
            int endLine = (redrawRect.y + redrawRect.height - 1) / rowHeight;
            endLine = Math.min(endLine, getSize() - 1);
            int y = startLine * rowHeight;
            int[] yInds = new int[] { y, y, y + rowHeight, y + rowHeight };
            int[] xInds = new int[] { 0, width, width, 0 };
            ListFieldCallback callBack = _callback;
            for (; startLine <= endLine; ++startLine) {

                if (startLine == curSelected) {

                    graphics.setColor(0x5882A2);

                    graphics.drawFilledPath(xInds, yInds, null, null);

                    graphics.setColor(Color.WHITE);

                    ClassDataListField dataToDraw = (ClassDataListField) callBack.get(this,
                            startLine);

                    graphics.drawText(dataToDraw._data_name, 5, yInds[0], 0, width);

                    if(do_colorcoding) {
                        if(dataToDraw._data_status.toLowerCase().equals("offline")) {
                            graphics.setColor(0xFF5F5F);
                        } else if(dataToDraw._data_status.toLowerCase().equals("online")) {
                            graphics.setColor(0x37DF4E);
                        }
                    }

                    graphics.drawText(dataToDraw._data_status, 0, yInds[0], DrawStyle.RIGHT, width);

                } else {

                    graphics.setColor(Color.WHITE);
                    ClassDataListField dataToDraw = (ClassDataListField) callBack.get(this,
                            startLine);

                    graphics.drawText(dataToDraw._data_name, 5, yInds[0], 0, width);

                    if(do_colorcoding) {
                        if(dataToDraw._data_status.toLowerCase().equals("offline")) {
                            graphics.setColor(0xFF5F5F);
                        } else if(dataToDraw._data_status.toLowerCase().equals("online")) {
                            graphics.setColor(0x37DF4E);
                        }
                    }

                    graphics.drawText(dataToDraw._data_status, 0, yInds[0], DrawStyle.RIGHT, width);

                }
                y += rowHeight;
                yInds[0] = y;
                yInds[1] = yInds[0];
                yInds[2] = y + rowHeight;
                yInds[3] = yInds[2];
            }
        }
    }

    protected void paint(Graphics graphics) {

        graphics.setBackgroundColor(Color.BLACK);
        graphics.clear();

        graphics.setColor(Color.WHITE);

          updateLayout();

        subpaint(graphics);
    }
}

So please help! I tried to remove the paint function Sub protected, but that has not helped. And the point is that it works only on a real device such as the 9700 "BOLD".

Problem solved!

I had to use

protected void applyTheme()'

{

}

Tags: BlackBerry Developers

Similar Questions

  • text and line color print black

    We use CS3 on PC. When I put a line of color on my text and print Docucolour text and contour on my HP Laserjet or 260 color printer prints black. Obviously the Laserjet prints black only, but we should see the shades of gray and on the printer of color as well the type of red and blue print in black. Before I reinstalled Indesign or any other patellar reflex reaction, someone has any ideas? I can open the suspicious document on another machine and the type still print black. A note: if I make a pdf of the document and send it to the printer color, it prints correctly.

    There is a text printed as black setting in the print dialog box. Perhaps this is true.

    Bob

  • Black Barry Bold 9700 blackBerry smartphones

    When the bb 9700 will be communicated to ca.

    Last week:

    http://www.Rogers.com/Web/link/wirelessBuyFlow?forwardTo=PhoneThenPlan&ProductType=normal&ProductID _...

  • I just bought my hp pc Pavilion g series, but many times not dΘmarre; the screen remains black or blue and must strive to market several times. What is going on?

    When I turn off my pc and that you want to turn it back on, it does not work and the screen remains black or blue, sometimes but nothing else and does not

    starts up, until I have try several times in pushing and disable the power button and suddenly starts working again. The pc is almost brand new (2 weeks)

    What is going on?  Thank you very much

    Hello

    I suggest you do the repair of the system startup and check if that helps resolve the issue.

    Check the link for more information on repair system below.

    Startup Repair

    http://Windows.Microsoft.com/en-us/Windows7/products/features/Startup-Repair

    You can also check the event viewer for more information on the error message.

    Open event viewer

    http://Windows.Microsoft.com/en-us/Windows7/open-Event-Viewer

    See also:

    Resolve stop (blue screen) errors
    http://Windows.Microsoft.com/en-us/Windows7/resolving-stop-blue-screen-errors-in-Windows-7

  • When I start my Equium P200D screen remains black

    Hello

    I have a portable Satellite P200D-139 (WinVista). I left on during a few hours after work a day to to this subject when I came back the screen was black, but there is no way get back on. I have turned it off manually (I know we're not really supposed to do, but I had no choice) and tried to turn it back on to the it, but there is nothing happening.

    I can hear it start about 2-5 seconds, then it's as if he won. I can still hear a slight noise hum (fan), but it is not from, and the screen remains black. Nothing lights up.
    I tried to cool, I tried to remove the battery, nothing works.
    I tried using F8 to repair, but is not answer either.
    I don't want to reformat it completely right now that I have docs and photos which I did not have time to put on the disk.

    Anyone would be able to help me with this? That's my working tool, so I'm kinda stuck with this problem.
    A big thank you to all those who can help.

    Kind regards
    Stéphane

    Hi Stephanew,
    as I recall it has an ati graphics card...

    but try this to get your machine to work:

    -pull out the hard drive to protect your data (Let's hope that there is no damage yet...)
    -take out the battery and try to start only with the power adapter > shoukld you see the toshiba on-screen logo > failure other components can be 'guilty '...

    -attach an external monitor to your computer and check if there is a visible image > no image at all?
    -check the memory, for this purpose, remove the memory and test if the satellite "buddies" > heard some of this? Yes?

    iasume the grafics card disappeared... see your certified partner...
    Let us know if this helped you.

  • HP omni 100-5015nl: HP omni 1100-5015nl starts, but the schreen remains black

    Last week my computer came out not sleepmode the schreen remained black.
    I tried to put the pc by pressing the power button when the pc started the schreen was still black.
    The pc starts, but the keyboard and mouse do not work and the schreen remains black.

    Hello @langenberg,

    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the Forums of HP, I would like to draw your attention to the Guide of the Forums HP first time here? Learn how to publish and more.

    I read your post on how your desktop computer stays on a black screen, and I'd be happy to help you in this case!

    For more to diagnose this problem, I recommend that you follow the steps described in this document on screen is blank after you start the computer. This should help to return the functionality of your computer display.

    If the problem persists, please call our technical support at the 800-474-6836. If you do not live in the United States / Canada region, please click the link below to get help from your region number.

    http://WWW8.HP.com/us/en/contact-HP/WW-phone-assist.html

    I hope this helps!

    Concerning

  • Transfer of blackBerry Smartphones to password Keeper, Memo Pad, and Photos of Bold 9700 new curve 9320

    Hello

    I don't have 'Outlook' put in place on my PC, or I really like.

    Is it possible to synchronize the password Keeper, Memo pad and the Photo of my current Bold 9700 to my Blackberry Desktop Manager?

    Then I can transfer these items to my curve 9320.

    Thank you.

    Tamara133 wrote:

    Is it possible to synchronize the password Keeper, Memo pad and the Photo of my current Bold 9700 to my Blackberry Desktop Manager?

    Then I can transfer these items to my curve 9320.

    Hi Tamara133

    Welcome to the Forums of the BlackBerry Support

    If you stay at 9320 curve then more easiset way to do this is an Assistant to switch device using Desktop software.

    KB23677  :  How to switch using BlackBerry Desktop Software devices.

     

    Or if you want to perform a selective restore to your new 9320 then first do a full backup of your old 9700 using desktop software. Once you have your backup connect your 9320 and run the software, select the device from software > restore > data choose selected since your last backup you did > scroll down the list and select only the password keeper and memo key data in this list, then click on apply.

    Or rfer to this Article:

    KB03953 : How to back up and restore data to a new BlackBerry smartphone

  • Smartphones blackBerry how to download and install application of guardian of password on the Bold 9700?

    Anyone can suggest me how can I download and install the application Passwordkeeper on Bold 9700? I got problem on recv email on my BB so yesterday my helpdesk provided formatted my device. Now, I don't see this application on my device.

    passwordkeeper is part of the blackberry device OS and it is always in the operating system, but sometimes it is not just installed. You need to download the operating system for your phone (the same that is installed on your phone). You can check it by typing the letters m y v e r together, and your model number and phone will appear like this, 9700/6.0.0.448.

    Download BlackBerry Desktop Manager from http://us.blackberry.com/apps-software/desktop/

    Go to the website of blackberry os to the: http://us.blackberry.com/support/downloads/download_sites.jsp

    Install the Desktop Manager, then the operating system.

    If you use x 86 windows, navigate to c:/program files/common files/research in motion/apploader/loader.exe

    If you are using x 64 windows, go to c:/program files (x 86) /common files/research in motion/apploader/loader.exe

    Start loader.exe, select your device, and all available for install/uninstall applications will appear. Passwordkeeper practice to install, click Next and follow the process and it will be installed. Your phone may restart during the installation.

    I hope this helps.

  • BlackBerry Bold 9700 smartphones keep closing and drains the battery.

    I'm new to this forum, so if this problem has been discussed and resolved, I apologize. My Bold 9700 guard dying and closing unexpectedly. It takes forever so he can start up (flashing red light).  Sometimes I even remove the battery to get a reaction. When the loading bar ends & comes back from the screen, the battery is completely dead, even if it was at least half full before that happened.  BTW, this has happened several times with my old battery so I bought a new OEM battery.  It's happened twice since then.  Stranger still, when I was with a friend today, his "BOLD" does exactly the same thing.  That is what it is?

    Your phone is obviously having software problems.  As such, you must reload the operating system of your phone.  Any other suggestion is just going to skirt the issue; You must get the brain of your charge phone.

    To do this, connect your phone to your PC and open BlackBerry Desktop Software.  Click the device in the upper part of the software and then update.

    If your phone does not connect to the BDS, take a look at this article from RIM:

    http://www.BlackBerry.com/BTSC/KB10144

    Let us know if that helps you.

  • BlackBerry smartphones after update to the 6.461 on Bold 9700 OS, mobile network = * no *.

    Hi all

    I'm new with this stuff and just upgraded my A$ T Bold 9700 OS 6 version 461 via the official release of BB using the such$ s .exe.

    The upgrade went very well with no problems but now no mobile network is found. It shows the following in the section mobile network:

    Data services = we

    Roaming = we

    Mobile network = * no *.

    Network mode = 3G & 2 G

    I've updated the operating system via Loader.exe

    I tried a battery pull, but it does not solve the issue. Before the upgrade, I deleted the vendor file.

    Help, please

    If you go to the screen of your icon manage connections, your Mobile network is checked to be on?

  • Satellite C660 C660D - Webcam color or black and white?

    Hello

    I was just wondering if the web camera on the Satellite C660/C660D is color or black and white?
    If its color, how can I change the color?

    Thank you.

    Hello

    Of course he came s color.
    It s a common webcam you have just black and white webcam photo?
    In your case I would recommend you the webcam software options.
    Start the camera Assistant software, and in properties, you can find the option called backlight Compensation. Check this option.
    Also in the Image tab, you will find some controls like: brightness, gamma, hue, saturation and sharpness. Play with these settings.

  • On a flyer, I need to produce black and PMS color. How can I create a PMS color (instead of something on the color wheel).

    On a flyer, I need to produce black and PMS color. How can I create a PMS color (instead of something on the color wheel or RGB)?

    It depends on the application. You use an inDesign application of PAO as Quark XPress, or something else?

    Many consumer apps is not able to output CMYK or specific pantone color combinations.

  • Satellite L650 - 12 p - black and white colors on webcam

    Hello people I have a quick question on my laptop which is a Satellite L650 - 12 p.

    When I bought it, I'm sure that the webcam was color, but now it turned black and white. I tried different settings but cannot retrieve the color. Why it happened and what can I do?

    Someone please help.

    Hello

    The webcam shows usually more colors like black and white only.

    I think that it s just something wrong with the parameters of the webcam. You should check out this article from Toshiba on webcam different parameters:
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=59

  • Restore color a black and white screen

    Hello

    I changed the display setting of the black and white color on the Mac Mini and now I can't restore it to color. How can I do? also printing in black and white too.

    Thank you

    For the display, go to: Apple > system preferences > accessibility > display and uncheck Use grayscale.

    -------------------------------------------------------------------------------- ------------------------

    To print, click file print and click on the blue arrow

    Select the printer settings

    then select color.

    Note: the printer preferences can be slightly different, depending on which printer you are using and what application you are printing from.

  • Canon MG5200 printer prints all colors except black in pink. So I can get black and pink print

    My printer is all colors except black in pink.  So I can get black and pink print

    Hello

    As Canon OEM is responsible for the good operation of the printer and their
    drivers provided. Check with Canon support, their books online and
    drivers and ask in their forums (if any).

    Canon - Support and drivers
    http://www.USA.Canon.com/Cusa/support/consumer

    Canon - Support - contact us
    http://www.USA.Canon.com/Cusa/consumer/standard_display/contact_us_consumer

    Canon - Windows - Vista and Windows 7 support
    http://www.USA.Canon.com/Cusa/consumer/products?pageKeyCode=windowsSupport

    Canon printer - page local confirmation - could be from another region.
    http://pdisp01.c-WSS.com/OS/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

Maybe you are looking for