Code background does not

Hello.

I placed the code below in the screen, just below the import instructions page.

The code is a knowledge base article. It compiles and the debugger is happy but the color of the screen on the BlackBerry Simulator screen remains white.

I imported the required API support. This who could I have missed?

class DecorTestScreen extends form {}

Private VerticalFieldManager _manager;
    
{DecorTestScreen()}
_manager = (VerticalFieldManager) getMainManager ();
        
Background bg = BackgroundFactory.createSolidBackground (Color.CYAN);
_manager.setbackground (BG);
        
}


}


Well, from what you have provided, I don't see why you DecorTestScreen to all. Stripping on your variables just to keep the shortest code example, you get this:

public class AvWxApp extends UiApplication {  public AvWxApp() {    pushScreen(new AvWxMainScreen());  }      public static void main(String[] args) {    (new AvWxApp()).enterEventDispatcher();  }}

public class AvWxMainScreen extends MainScreen {  public AvWxMainScreen() {    getMainManager().setBackground(      BackgroundFactory.createSolidBackground(Color.CYAN));  }}

This assumes two public classes in two modules; You can do this in a single module through the screen an inner class private, of course.  I have not actually run, so there may be errors, but it is essentially the code that I ran.

Maybe you have a reason for a third class - you want to play with it and then throw it away, you want to let the user start with a button, whatever.  That's OK, too, but you need to instantiate somewhere. Again, I have not run this, just ginned it upward on the fly and it's a skeleton - for example, you may need to do something to close the screen - but here the general idea:

public class AvWxMainScreen extends MainScreen      implements FieldChangeListener {  public AvWxMainScreen() {    getMainManager().setBackground(      BackgroundFactory.createSolidBackground(Color.CYAN));    ButtonField blueButton = new ButtonField("Go Blue!");    blueButton.setFieldChangeListener(this);  }

  public void fieldChanged(Field field, int context) {    UiApplication.getUiApplication().push(new DecorTestScreen());  }

  private class DecorTestScreen extends MainScreen {    public DecorTestScreen() {      getMainManager().setBackground(        BackgroundFactory.createSolidBackground(Color.BLUE));    }  }}

Once you shake the bugs out, this should give you a screen cyan with a top button.  By pressing the button should give you a blue screen.

Let me know if my example is too broken to fix, but it should be enough to get you moving.

Tags: BlackBerry Developers

Similar Questions

  • background does not properly

    I have a site I'm working on: http://matthewtbrown.com/mercerworld/mercerworld1.html

    Basically, the background does not work as it should. I want to extend across the page horizontally. It is 1 pixel wide with a white top and a blue background.

    Here is the link to the chart: http://matthewtbrown.com/mercerworld/images/background.PNG

    My code is on the scene and is:

    $('html,_body').css ({}

    "background': 'url(images/background.png) no-repeat fixed center."

    "- webkit - background-size ': 'cover."

    "- moz - background-size ': 'cover."

    "background - o - size': 'cover."

    "background-size': 'cover."

    "filter": "progid:DXImageTransform.Microsoft.AlphaImageLoader (src =" images/background.png ', sizingMethod = "scale").

    '- ms - filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader (src =" images/background.png ', sizingMethod = "scale").

    });

    Any ideas?

    Everything you need in this case is horizontal (vertical) of the upper left corner.

    For the following should do it:

    $('html,_body').css ({}

    'background': 'url(images/background.png) high horizontal left.

    });

    Darrell

  • Hover background does not properly

    I insert a different class in a paragraph. For some reason, the hover background does not appear when it is used here. It works fine apart from that. No idea why and how can I fix or bypass? Thank you


    > Join our < a href = "" javascript:; "> < span class ="linkttxt"> program sponsorship </span > < /a > and you get a free neck sock, a $24.00 value." Just register and one of your friends mention your name when they purchase one of our fine grids. Buy 2 grills, check yourself and get one in any case. < table >


    Here's the info of css, but it works very well indeed:
    }
    {.linkttxt}
    do-family: Verdana, Arial, Helvetica, without serif.
    do-size: 12px;
    make-weight: bold;
    color: #996600;
    text-decoration: none;
    }
    .linkttxt a: link {}
    color: #996600;
    ;
    text-decoration: none;
    }
    .linkttxt a: visited {}
    color: #996600;
    text-decoration: none;
    }
    .linkttxt a: hover {}
    color: #003366;
    text-decoration: none;
    background-color: #CCCC99;
    }




    Let's not your CSS.

    If it is your code-

    Join our reference
    Program
    and

    So this--

    .linkttxt a: link {}
    color: #996600;
    ;
    text-decoration: none;
    }

    (and everything else) could not apply since the .linkttxt is inside
    the tag.

    You need to do-

    Join our reference
    Program
    and

    These rules apply. Or, try this.

    {a.linkttxt:Link}
    color: #996600;
    ;
    text-decoration: none;
    }

    with this--

    Join our referral program and

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "blueman2" wrote in message
    News:erimji$HBK$1@forums. Macromedia.com...
    > I am insert a different class in a paragraph. For some reason, the
    > hover
    > background does not appear when it is used here. It works fine apart from
    > this. Any
    > idea why and how I can fix or bypass? Thank you
    >
    >
    > > Join our reference
    > Program
    and you get a free neck sock, a value of $24.00.
    > Just
    > Sign up and have one of your friends mention your name when buying
    > a
    > our fine grids. Buy 2 grills, check yourself and get one in any case.
    >
    >
    > Here is the info of css, but it works very well indeed:
    > }
    > .linkttxt {}
    > do-family: Verdana, Arial, Helvetica, without serif.
    > do-size: 12px;
    > make-weight: bold;
    > color: #996600;
    > text-decoration: none;
    > }
    > .linkttxt a: link {}
    > color: #996600;
    > ;
    > text-decoration: none;
    > }
    > .linkttxt a: visited {}
    > color: #996600;
    > text-decoration: none;
    > }
    > .linkttxt a: hover {}
    > color: #003366;
    > text-decoration: none;
    > background-color: #CCCC99;
    > }
    >
    >
    >
    >
    >
    >

  • error code 259 does not correctly updated to sp62736.

    I have a Hp Pavilion 500-141ea im trying to update the IDT audio driver for windows 8, I supported SP sp62736, it passes through the installation procedure, then it stops and comes up with this error code 259 does not correctly updated, I even disabled etc still the same antivirus software.

    Any idea?

    Hi Apache1968,

    If everything works at the moment, with the exception of downloading then I would leave it as it is. The whole "don't mess with what works" thing.

    Thank you

  • I bought creative cloud + 500px great, have the activation code, but does not know where to enter. Can someone tell me what to do?

    I bought creative cloud + 500px great, have the activation code, but does not know where to enter. Can someone tell me what to do?

    Please see the link How to activate/use Adobe CC Redemption Code

    Hope this will help you.

    Kind regards

    Hervé Khare

  • Code hints does not work.

    code hints does not work. Options are checked in the preferences, but no list of suggestions appears when I write the code.

    Any ideas? (Sorry for my English)

    Nicolas

    I find the problem!

    There seems to be a conflict with the port with an extensionnel screen display!

    When I start Dreamweaver with display port unplugged, dreamweaver works fine. And I can plug it after and it stills work. Other wise, if I plug the display port before launching dreamweaver, code hinting doesn't work anymore.

    Thanks to you all

  • Fixed background (resize browser so background does not move)

    Hey,.

    Im a noob to dreamweaver please bear with me while I try to explain this to you guys.

    IM designing a website and I need to keep the background image in a fixed position, so that when you resize the Explorer it doesn't move and stays in the place you want according to the homepage. For example the adobe forums who we are, when you resize the window, the background does not move, but extends to the place, letting the checkerd design where it is next to the page, except that I need that on both sides. (For example, gametrailers.com, resizing, it leaves beside the page designs.

    I can't really explain much more of that, I just need the background image to remain fixed behind the page, and I have no idea how do, not to mention that the method or style is called so I can't search for tutorials. Sorry if I used termanoligy evil or anything, really new to this.

    Thank you

    Devresse

    (For example, gametrailers.com, resizing, it leaves beside the page designs.

    This site uses the following CSS rule on the body tag

    {body
    margin: 0;
    text-align: center;
    background: #C2C4C6 url(/images/gt6background.gif) scroll Center repeat-y;
    }

    If you are not familiar with CSS, now is a good time to start learning to decipher meanings.

    You can use 'fixed' instead of 'scroll '.

  • XML of LiveDocs code example does not work

    Hello, I am new to Flex with a background in JS, HTML, CSS and PHP. I am trying to learn by following examples of LiveDocs. Example XML file loading, found here, will not work for me. I created a basic XML file and pasted the code in an MXML application inside '< mx:Script >' vanilla. When I run the application, I get two errors number 1120 similar on the line indicating "myLoader.addEventListener ("complete", xmlLoaded);". Error messages are telling me that "telephone" and "xmlLoaded" of properties is not valid. How can I fix this to work properly?

    Here is an example of the XML file that I use.

    There are several problems with this article of dip. The url does not appear to exist, so I put the xml data in a data4.xml file in a local xml file 'data' that should be a subdirectory of the directory containing the file mxml app.

    In addition, the variables must be declared outside a function to be global, but the addEventListener line must be in a function, so I put it in an init() function to call on the initialization of the application.

  • code 80070020__could does not update vista

    When I tried to installed an important update it keeps failing

    http://support.Microsoft.com/kb/883825

    You receive error 0 x 80070020 when you use the Windows Update Web site or the Microsoft Update Web site to install the updates

    If the above does not solve the problem, repost in the appropriate Forum:

    It's updated operating system Vista, upgraded installation and activate Forum.

    You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/threads

    When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.

    In this way, you will receive the best help.

    See you soon.

    Mick Murphy - Microsoft partner

  • Animate the HTML/JS Code CC does not not like chronology

    When you run the CC code animate HTML/JS in a browser, it plays correctly with the exception of a layer that has a little problem.

    Play the same timeline in Animate works as it should.

    I do not see any place to download the HTML code and the JS on this forum. For obvious reasons, this is not a site online.

    How can I view code HTML and JS so anyone can see what is happening.

    Even if the JS error is found and corrected manually, it does not solve the problem of why the errant code is generated by Animate a layer for.

    Thanks for your help...

    RMT

    The question is on chassis 90, in your "Quote 1" layer, you have a different symbol ("quote 1") and then on the rest of the images, you have a symbol called "Quote CN 1.ai".

    Clearly, the keyframe on frame of 90 and the glitch will be gone.

    For accurate results, always test your animation in the browser; not the timeline.

  • Coupon code redeem does not

    I received a coupon in the Conference Microsoft BUILD. However, whenever I try to use this code, it says country does not. I tried with different countries or account, but it does not work. Also, I got the chat session with support but failed. Help, please.

    Hello

    Could you please send me a private message with the following information

    Redemption code

    Adobe ID/email used

    Your full address

    Thank you

    Bev

  • I get error code program does not. What should I try?

    Every program I try to use rpet "program does not."  Cannot use the computer at all.  I already have

    tried all the suggestion of help: reset the onboard computer, closed & restarted, installed all updates.

    Hello

    (1) have you made any changes to the computer before the show?

    (2) what operating system is installed on the computer?

    (3) what antivirus application do you use?

    If you use Vista operating system follow these steps. If not, answer us with more information we will help you further.

    Method 1:

    Step 1: Try to restart your computer in safe mode and check if the applications are working fine.

    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    If it works fine in safe mode, try to perform a clean boot in order to find the root cause.

    Step 2: Perform the clean boot using the suggestions mentioned in the link mentioned below.

    http://support.Microsoft.com/kb/929135

    NOTE: once you check the clean boot feature configure Windows to use a Normal startup using step 7 proposed in the above mentioned link.

    Method 2: Run a full scan of the computer by using the following antivirus applications.

    Microsoft Safety Scanner: http://www.microsoft.com/security/scanner/en-us/default.aspx

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Method 3: Optimize Windows Vista for better performance

    http://Windows.Microsoft.com/en-us/Windows-Vista/optimize-Windows-Vista-for-better-performance

    I hope this helps!

  • My body background does not appear on all of my Web pages?

    www.hunterstables.co.UK

    I changed my body to have a clear grey color but it shows only on a few pages - why is it please. The color does not appear on the product page or one of the drop-down list of the menus under products, not the gallery page.

    Kind regards

    Karen

    Don't worry I have sorted out what's wrong.  Thanks anyway

  • TypeError: Error #1010 on code that does not exist.

    Hi all

    I have a drop down list with 7 options. The menu is a clip with a mask that reveals to each buttons when a person mouse_overs touch menu. Each option of the menu does the same thing, it calls a function based on the clicked button. The function of each button does the same thing:

    function INDEX_Safety (e:MouseEvent): void

    {

    Play();

    INDEX_SAFETY = true;

    Sound_Stopper ();

    }

    Each function will change the value of its variable Boolean respecive. One for each button. Its CAP is a function that stops all sounds FLV which is currently playing.

    When it goes through play() it will come to a particular framework that presents:

    Index_Jumper ();

    This function determines what boolean is set to true and made a gotoAndPlay ("name") based on the Boolean value that has been set to true. Then sets the Boolean back to false.

    function Index_Jumper (): void

    {

    If (INDEX_SAFETY == true) {gotoAndPlay ("Safety"); INDEX_SAFETY = false ;}

    If (INDEX_TOOLS == true) {gotoAndPlay ("tools and Positions"); INDEX_TOOLS = false ;}

    If (INDEX_METHODS == true) {gotoAndPlay ("methods"); INDEX_METHODS = false ;}

    If (INDEX_METHOD1 == true) {gotoAndPlay ("method 1"); INDEX_METHOD1 = false ;}

    If (INDEX_METHOD2 == true) {gotoAndPlay ("method 2"); INDEX_METHOD2 = false ;}

    If (INDEX_TDBL == true) {gotoAndPlay ("installation TDBL"); INDEX_TDBL = false ;}

    If (INDEX_RAISING == true) {gotoAndPlay ("the Outreach booth"); INDEX_RAISING = false ;}

    }

    The question I have: when I click on option 6, TDBL, I get the error:

    TypeError: Error #1010: a term is undefined and has no properties.

    at RaisingtheOperatorsPlatform_fla::MainTimeline/frame147() [RaisingtheOperatorsPlatform_fla. MainTimeline::frame147:10]

    It is said framework 147:10

    From my understanding, this means the 10th line on frame 147.

    It's my frame 147:

    1. stop ();

    2 legend ();

    3 IndexMC.Safety_Menu_Button.addEventListener(MouseEvent.CLICK, INDEX_Safety);

    4 IndexMC.Tools_Menu_Button.addEventListener(MouseEvent.CLICK, INDEX_Tools);

    5 IndexMC.Methods_Menu_Button.addEventListener(MouseEvent.CLICK, INDEX_Methods);

    6 IndexMC.Method1_Menu_Button.addEventListener(MouseEvent.CLICK, INDEX_Method1);

    7 IndexMC.Method2_Menu_Button.addEventListener(MouseEvent.CLICK, INDEX_Method2);

    8 IndexMC.TBDL_Menu_Button.addEventListener(MouseEvent.CLICK, INDEX_Tdbl);

    9 IndexMC.Raising_Menu_Button.addEventListener(MouseEvent.CLICK, INDEX_Raising);

    I don't have a 10 line.

    also, when I click option 7, nothing happens. However, options 1-5 on the drop in the menu drop-down work very well.

    Thanks for any idea.

    Just after the announcement, I had an idea to try to add the following in order to frame 1:

    addEventListener (Event.ENTER_FRAME, Frame_147);

    function Frame_147 (event: Event): void

    {

    If (currentFrame is 147)

    {

    Stop ();

    Legend ();

    IndexMC.Safety_Menu_Button.addEventListener (MouseEvent.CLICK, INDEX_Safety);

    IndexMC.Tools_Menu_Button.addEventListener (MouseEvent.CLICK, INDEX_Tools);

    IndexMC.Methods_Menu_Button.addEventListener (MouseEvent.CLICK, INDEX_Methods);

    IndexMC.Method1_Menu_Button.addEventListener (MouseEvent.CLICK, INDEX_Method1);

    IndexMC.Method2_Menu_Button.addEventListener (MouseEvent.CLICK, INDEX_Method2);

    IndexMC.TDBL_Menu_Button.addEventListener (MouseEvent.CLICK, INDEX_Tdbl);

    IndexMC.Raising_Menu_Button.addEventListener (MouseEvent.CLICK, INDEX_Raising);

    }

    }

    I then commented out frame 147.

    the error showed up on line 36 of the frame 1, which is:

    IndexMC.TDBL_Menu_Button.addEventListener (MouseEvent.CLICK, INDEX_Tdbl);

    Being able to focus on it, I see that I have IndexMC.TBDL instead of IndexMC.TDBL, I think it was one of those "leaning on this thing for too long errors." Thank you for looking into it, the problem is now resolved. In regard to the error pointing to a line that does not exist:

    I still have no idea why he would say that was frame 147:10

  • Green text in code view does not automatically complete?

    Okay, so I'm just four months using Dreamweaver CS6 - but I am learning.

    Right now I use a book, ' CSS3: The Missing Manual, "and I'm hand-coding text in Dreamweaver. Most of the time, I'll have the handy "auto-complete" feature, but whenever the text is GREEN, the AutoComplete feature does not work. For example:

    DreamweaverScreenSnapz001.png

    Can someone tell me why? What I am doing wrong?

    Thank you

    Clinton

    clinton_dyches wrote:

    Okay, so I'm just four months using Dreamweaver CS6 - but I am learning.

    Right now I use a book, ' CSS3: The Missing Manual, "and I'm hand-coding text in Dreamweaver. Most of the time, I'll have the handy "auto-complete" feature, but whenever the text is GREEN, the AutoComplete feature does not work. For example:

    Can someone tell me why? What I am doing wrong?

    Thank you

    Clinton

    H1 {}

    make-weight: normal; NOT normal"

    Also

    . Intro {}

    color: #6a94cc; NOT of #6a94cc:

    If youre hand coding you need to be careful, BUT the advantage is it's faster and you will learn a lot quiker and feel more fulfilled by being able to adapt the css rules.

Maybe you are looking for