Background image will not appear

I almost tried everything. I spent hours reading the reference API and examples. I still can't get this simple code to work. This is what I have, I would like to use to display a picture as the background.

class StartGame extends MainScreen {
    StartGame(){
        super(NO_VERTICAL_SCROLL | NO_VERTICAL_SCROLLBAR);
        setTitle("Start Game");
    }

    protected void paintBackground( Graphics g ){
        g.clear();
        Bitmap bgImage = Bitmap.getBitmapResource("img/bg.png");
        g.drawBitmap(0, 0, 360, 480, bgImage, 0, 0);     

    }
}

I finally got it to work. For those interested, this is the code I used. Thank you all

class StartGame extends MainScreen {
    //Vars
        private VerticalFieldManager _manager;

    StartGame() {
        //Set Background
            _manager = (VerticalFieldManager)getMainManager();
            Background bg = BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("img/bg.png"));
            _manager.setBackground(bg);

   }
}

Tags: BlackBerry Developers

Similar Questions

  • 100% width background images do not appear in chrome when I apply scroll effects. Please help someone

    Since the last update to dream my 100% width background images do not appear in chrome when I apply scroll effects. Does anyone else have this problem? They work on all other platforms, but not chrome. I talked with adobe and they said basically their cant be a problem on their end because no one else has not complained.

    problem solved, it's adding css that I included in the site

  • Why my selected image will not appear on the chassis of the big money develop?

    Why my selected image will not appear on the chassis of the big money develop? It appears on the left side, but I see only a blue box with an X in the middle of the big Frame in the Center?

    Go to your Lightroom preferences, performance tab, uncheck the box use the graphics processor.

  • Image will not appear on my page. I need some advice...

    On my site I've place an image in dreamweaver. Now, I did this als on another page on this site. But for some reason any custom of Spain show... ive tried somuch but I can understand why the image will not appear on the screen...

    image is uploaded... ive also tried jpg, but this isn't the problem.

    I hope you can help...

    If you press F5 view once, you will see that there is a framework for the illustration...

    http://www.Dorff.nl/consultancy.html

    Best regards, Brian

    URLS are case sensitive. Give the file name an uppercase V and it will appear.

    SRC = "images/Visie.gif"

  • cover image will not appear

    the cover image will not be displayed for one of my projects, I tried to put into service and it still does not appear publicly. It will show that I am connected, if the "E3 2014: Mortal Kombat X Preview with Steve Beran" video at the bottom of my profile.

    Behance

    Also where staff monitors this forum we leave him a message on if isn't working for me the submit button is grayed out even though I filled everything, safari OS X 10.11.1 901


    Thank you!

    Hello - you marked this project as containing "Adult Content", which means that it is placed behind the adult wall and not visible to registered-out users, or users under 18. If you have any questions about this, contact Behance support team: on.be.net/GetHelp.

    Also - I do not know which box "leave a message" you are referring to-you can send a screenshot? Thank you!

  • Background image does not appear

    I worked on my Web site recently, and in order to personalize it a bit more I added some background images to the cells. The problem is that the image does not appear in my browser. I tested background images of page too and nothing. It makes no sense. I select the cell, go to the properties panel, and then find a background image. Once I have select this one appears in dreamweaver, looking the way it is supposed to. After I downloaded the page, however, I check in my browsers, Mozilla Firefox and Internet Explorer, and the image is not there. All this shows is the background color of the cell or of the page, depending on the question of whether I make the background color of the transparent cell. I asked a few friends to view the page too to see if it is for them and they tell me that it is not for them either. Anyone know why this is happening? Oh I should mention I publish as an html file and I tried both .jpeg and .png file types. In addition, it's all in Dreamweaver 8. Any help would be greatly appreciated. Thanks in advance.

    Background ="... /... / move background2.jpg

    can't go up two levels of folders from there...

    Also should avoid spaces in the names of files and folders.

    copy of a previous post on this topic:

    the style sheet link and especially images that you have placed have paths such as
    this:

    ../gifs/ means go UP one folder level, then into the folder named ">

    The problem: the home.html file is at the level of the root of the public
    space web is not not to attend. So all these paths are distributed on the
    downloaded pages.

    My guess her site definition is set to the wrong folder level in the
    local and remote site.

    The way it should be is the local and remote should be defined in the folder
    that contains home.html. Use the 'Folder of the Site Local' button to select the
    good record and the "host directory" If the folder level must be
    adjusted on the remote control (such as you land in a high level of private accommodation
    folder when connecting with ftp and need to go to one site files
    folder named "public_html" then type public_html directory of the host
    the remote server info line)

    > The page is http://www.flash-vault.com/submissions.
    > The background image is supposed to appear behind the five titles in the
    > first column. It appears in dreamweaver and when I saw, but not after
    > It is published.
    >

  • Bootstrap 3 - Navbar Background Image will not repeat (view Mobile)

    When I reduce the browser for mobile display, won't repeat my background image, is there a solution for this?

    Navigation bar - YouTube

    # 1, you must repeat the two ways - both vertically and horizontally.

    Repeat = both sense, repeat-x is alone, repeat-y = to the bottom only.

    #2, you must add a color code for the case mobile users have turned off images to save their data plan. It is good practice on all websites BTW - where do not load background images.

    {.navbar}

    background: #2B2B65 url (.. / images/navbg.png) repeat

    }

    Nancy O.

  • Screen background image will not stretch (or tile, etc.)

    I use the version of Windows 7 Home Premium 64 - bit OS and have set a custom as my screen background image.  It displays fine, but if I right-click on the desktop and go in 'Customize', then select 'Desktop Background' and use the drop-down "image Position" menu, select "Stretch" has no effect.  None of the other selections "image Position" has no effect, either.

    I put the photo as wallpaper the usual way, by right click on my photo in Adobe Photoshop Elements 10 and by selecting "use as wallpaper."
    It seems that something is too much on the selections of "image Position"... any ideas of what this could be?
    Thanks much for any help.

    Sounds like a problem to adobe.

    Delete files and re add it using windows / search and add the file to your my photos site. No photo shop album...

  • Images will not appear on a Panasonic TV

    Panasonic said because I changed my photos I need the following codec.  I don't know what I have to do the CS6.  The edited files have been save to JPEG on PS CS6

    JPEG (DCF & standards EXIF) files

    Subsampling - 4:4:4, 4:2:2 and 4:2:0

    Resolution of image - 8 x 8 to 30, 719 x 17, 279 pixels.

    .

    Thank you

    Mike


    If you need more info let me know

    Hi Squatch,

    Reopen the jpeg file in Photoshop, click on file and click on save for web. In the save for web options, select the jpeg format and then choose the preset named "JPEG Medium"

    Try that and check if the images will be displayed in the Panasonic Tv.

    Thank you

  • My background image will not fill in Google chrome

    Hello

    I am trying to attach my background image to fill the entire page for all IE, google chrome ec. How to achieve this?

    Hello

    Please ensure that you have followed the correct steps to add the image to the browser padding:

    Add a picture to the background of the page or the browser. Adobe Muse CC tutorials

    Concerning

    Sonam

  • Overview of the image will not appear

    Product name: HP Pavilion dv6 Notebook PC

    My photo icons do not display the preview of the image. They all resemble the default image for the program that opens to them. All the photos on my desktop and folders are like that and when I get pictures of my cameras it get frustrating to attempt to distinguish each one of them.

    Display options do not work and neither does change icon size or default opening of the program. In fact Let's say an image opens with paint, the default image is a yellow and a red flower. When I change the default program for the Photo Viewer icon does not change to the small landscape for Photo Viewer icon.

    Hello

    Here's something to check.

    Open windows control panel, open Folder Options and click the view tab.  Check that there is not a check mark in the check box "show icons, never thumbnails", if there is, click the box to remove the tick and then click on apply then Ok to save the change.

    Kind regards

    DP - K

  • Why image will not appear in the div?

    I'm just starting to try the passage of basic css tables is inspired.  Read a few transitional tutorials on the adobe site.  Can someone ' a Please take a look at this link http://4keys.ca/tryingcss.html and tell me why I can't get the image in live view, preview or the url I posted.  I get the broken link question mark for the image each time.  Thank you.

    What you did sounds OK if your site is correctly set.

    If you use Insert > Image in DW to insert the image, you should not get an operating system file path.

    Should read

    or similar

  • Images will not appear on Facebook in Google Chrome...

    I have an icon with a red square, a blue triangle and a green circle instead of see a lot of images. How can I get rid of this problem and see my pictures again?

    Hi Katt,
    Here is the link to the support of Chrome:
    http://www.Google.com/support/forum/p/chrome
    Eddie

  • Background images are not displayed (CSS, other images ok

    I tried to empty cache, watched: config for odd configurations, made a private window and disabled all extensions. None of them had no effect.

    Test pages: Amazon.com and https://developer.mozilla.org/samples/cssref/background-image.html - two of these pages have loaded by CSS background pictures. For example, the Amazon logo at the top left is a background loaded from a CSS page. The image itself can be found in gross:
    http://g-ECX.images-Amazon.com/images/G/01/gno/sprites/global-sprite-v1._V339353059_.PNG

    This image cannot:
    https://developer.Mozilla.org/samples/cssref/images/starsolid.gif

    But why, why why these images are displayed on their relevant Web pages? I see that Amazon, eBay, and many other sites Web without a range full of images. In particular those used for menus and other important navigation buttons.

    Here's what I see on the Mozilla page mentioned above: I see the text, but no expandable star image. It works in other browsers and on other computers in Firefox.

    The page that I tap on right now has no blue background, windows are not correct (as the search engine is not a rounded grey area) and the magnifying of research is missing. So this experience makes it impossible the use of simple pages.

    Firefox 32, Vista

    It was a strange setting. I have it set, then updated some of the relevant information on the subject myself. Here's the question:

    If the preference of the user browser.display.use_document_colors in subject: config is set to false, the background images will not display.

  • report image does not appear when a certain background cordinate is exceeded

    Hi all

    I create reports of DIAdem using script functions. Since the update to tiara 2015 (I belive) there is a mistake that didn't happen before:

    When I add a new Image to the State and lower coordinate is that below a certain value (~50...60) the image appears correctly. However if the lower coordinate exceeds this value the image will not be displayed (see the attached example script)

    Thanks in advance

    Christoph

    Hi Christoph,

    Properties of position change if changing the related properties.

    For example, if you change the height of the image to 100%, up and down changes to 0% each.

    If you change the background property to 60% as in the example script you, height + Top must be 40%.

    I hope that this screenshot with your source code to understand the problem:

    If the height or width property is zero, no picture!

    I suggest not to define two properties for a dimension (for example Top and height or up and down).

    If you set only one of the three properties, position of the image is not fully defined by the user, but by some default values of DIAdem.

    Concerning

    Christian

Maybe you are looking for

  • How to use App Photos efficiently?

    In App Photos where can I delete pictures so that they are deleted overall? I'm creating albums and deleting photos here, but I still see them in pictures. Should I delete photos in all photo and then create an album to keep things clean?  What is th

  • Java SE RE 6u21 for Windows 7 64-bit or 32-bit when I use Winodws 7 64-bit

    I use Windows 7 64-bit.Should which version of JRE I use 64-bit or 32-bit?What the plug-in in the 64 bit version of the Java JRE? I need Firefox to use Java? Thank you This has happened Don't know how many times

  • Tecra A11-13 q - are there drivers for Windows 7 32 bit

    Hello I want to buy portable (as in the subject).In the shop, there are only 64-bit Windows 7. My question - is there drivers for Windows 7 32-bit system if I want to change the system?Or I have to use only 64 - bit. And another. I found on the web t

  • revealing errors of IO HD?

    with super duper or carbon copy I get I/O chess with my drive main clone process, to a variety of readers of destination. I tried testing large and repetitive drive with Warrior drive, disk utility, the test drive of Blackmagic application, and it co

  • Need help with CRC-16-IBM

    Hi all I have a servo-motor brand Ezi-Servo, which operate by sending the command series for her. The problem I've got is on CRC Checksum. I tried my best to do, but the result was not the same as the sample code they gave me. Please check my code an