Define an ImageView to fill the entire screen

Hi veveryone,

I need to have the ImageView stretch to fill the screen. How can I go about it?

Should I get the height and width of the screen? If so, how?

Thank you

The code below does not work, it only centers the image

 Page *root = new Page;

    Container *container=new Container();
    container->setLayout(DockLayout::create());
    container->setBottomPadding(0);
    container->setLeftPadding(0);
    container->setTopPadding(0);
    container->setRightPadding(0);

    container->setBottomMargin(0);
    container->setLeftMargin(0);
    container->setTopMargin(0);
    container->setRightMargin (0);

    container->setParent(root);

    ImageView* img= ImageView::create("asset:///images/image.png");
    img->setHorizontalAlignment(HorizontalAlignment::Center);
    img->setVerticalAlignment(VerticalAlignment::Center);
    img->setScalingMethod(ScalingMethod::AspectFill);

    container->add(offImageView);

    root->setContent(container);

Try this

 Page *root = new Page;

        Container *container=new Container();
        container->setLayout(DockLayout::create());
        container->setBottomMargin(0);
        container->setLeftMargin(0);
        container->setTopMargin(0);
        container->setRightMargin (0);

        container->setParent(root);

        ImageView* offImageView= ImageView::create("asset:///images/image.jpg");
        offImageView->setLayoutProperties(DockLayoutProperties::create().horizontal(HorizontalAlignment::Fill).vertical(VerticalAlignment::Fill));
        offImageView->setScalingMethod(ScalingMethod::AspectFill);

        container->add(offImageView);

        root->setContent(container);

    Application::setScene(root);

Tags: BlackBerry Developers

Similar Questions

  • When I do a bad screen images balloon race to fill the entire screen. How can I find them to normal?

    I don't know what to do so that the stroke of the image upwards. Do not fill the entire screen, they fill the screen to normal size. This has happened on two sites. How can I get them back to normal.

    Is it on Android or desktop? On Android, try double-clicking to zoom out. On the desktop, to reset the zoom, try Ctrl + 0 (it is a zero).

  • Home page fills the entire screen

    When I connect to internet, my homepage (Google) fills the entire screen.  The tabs at the top will appear briefly, then disappear, the taskbar at the bottom is not there, so there is no "Start" button I can click on the closure of the computer; I have to cut out food.  Is there a way can I fix?

    A chrome switched mode "full screen" for some reason any?

    Try the 11 key function toggle to see if this switches between full and glass screens.

    for example, press the button to see if that helps.

    If this does not work, try to press on together to change the selected program.

  • LR fills the entire screen. How can I reduce this so I can control the size or reduce it with the help of the control-M?

    LR fills the entire screen. How can I reduce this so I can control the size or reduce it with the help of the control-M?

    Hi DP,.

    Are full-screen mode in Lightroom, you can it exist by pressing SHIFT + F.

    Kind regards

    Mohit

  • Beginner - how to make the picture to fill the entire screen

    I have two 640 x 480 photos.  It fills the entire screen, and the other is not. What causes this? Photo shop can be used to make the second fill the screen?

    The image is 653 pixels wide by 345 pixels high. You would have to know the resolutions of your phone and tablet to get this picture fits correctly as background, then use command size of the Image in Photoshop to resize accordingly.

    Note that the increase in the size of the image will explode just imperfections, such as digital compression / artifacts that happens in an image to JPEG file. (The famous "macroblocking.") It would be better if you can get your hands on a copy uncompressed this image, if possible, for the purpose of resizing. (BMP and RAW formats are not compressed, for example.)

  • I want an image to fill the entire screen without margins

    I want an image to fill the entire screen without margins, much like this one, http://waltoninsurancegroup.com/contact , but I want to keep my margin for everything else the same. can someone help me with this? dreamweaver CC

    Don't forget to turn off the margin of browser default to yourtag with the css...

    {body

    margin: 0;

    }

    If you do not do this, any width 100% image, you add stops a good 20 pixels of up, down, left, right

  • DV5Z w/HDMI does not fill the entire screen

    I have a DV5Z with installed Blu - ray player. When I connect the Dv5z for my Panasonice 42 in plasma 720 p with the HDMI cable, the entire screen is not used in full picture format. There is a border of 1 inch around top, bottom, left and right.  My DV5Z has ATI HD 3200 graphics card and I do not understand where I need to adjust it so that it works ok. I already had a Dv5T with Intel 4500 and it worked fine, (in fact he filled a little too much about "1/4 of the image has been off the screen) but not the DV5z and I don't want to watch some blu ray movies with 1inch border around the screen. Where are the settings for me to adjust so that I can watch movies under the eyes?

    I adjusted the display settings, and it did not work. What could be the problem I need to adjust?

    I also adjusted the aspect of the TV and H-fill is not anywhere close and zoom isn't closed and 4; 3, that's not what I want to use.

    Any help is appreciated.

    Try using the ATI Catalyst software.  You should see an option for HDTV in the list on the left in the Advanced view.  It has a few decent explanations on how to use it to configure your TV.  I do not have my dv5z before me right now so I can't be more specific.  If you need more details, let me know, I got exactly the same problem and got it working.

  • When the page opens it fills the entire screen and I can't access anything else unless I'm going on the current site. I can't reduce it.

    When I opened a site, it fills the whole page and I can't minimize it or get simultaneously to another page. The only option I currently have is to put the cursor in the upper left corner, and only the current site tab appears.

    Firefox may be using the view full screen. To switch to normal view try is:

    • Hit F11 on the keyboard
    • Drag your mouse pointer to the top of the screen and then right click (or try the Mac equivalent to a mouse button)

    Do any of these work?

  • How can I keep my swf file to expand to fill the entire screen?

    I'm selling this metronome:

    http://www.FuzzyMonkeyTabs.com/METRONOME/metronome.html

    I introduced to the activeDen.com and was rejected for "aesthetic reasons" I noticed when I double click the swf file, it opens in my web browser and it is enlarged to fill the screen.  It's bad because I use JPEGs instead of vector art and I don't like the option allow smoothing in flash because it blurs the image a bit.

    So is it possible to make my swf file appear correctly?

    your first sentence is correct.

  • Watch the video on the Pearl Flip 8220 smart blackBerry phones, how to make horizontal and fill the entire screen?

    I have movies on my flip. When I look at a screen remains vertical and small. Is there a way to make the horizontal screen and use the full screen? Thank you.

    After some trial and error, I discovered, you must use the blackberry Media Manager to transfer your movies and when you move the film selected your file to your phone, you must select the option 'optimize '. When I did this it turned the film 1/4 turn so I could watch it on full screen. To make the small of DVD movies to the mpg4, I use a program called "convert M2 to Smartphone". It works well.

  • How to fill the entire screen with the background color?

    It doesn't seem like it should be difficult, but of course, it seems to be. I put the background color on themy page, but it only fills half the screen in the Simulator. It's a small page.

    OK, so I went to some styles. I updated the style of the body height: 100%; min-size: 100%. That no longer works. Then I added a

    that enveloped the rest of the content on my page and set the style to the same height: 100%; min-size: 100%. Still nothing.

    What gives? Of course, the Simulator seems all ignore them.

    I use the VS plugin and simulate with the simulator of the storm.

    Thank you

    Bill

    in the onload of the body, you can also do this line of code:

    document.body.style.height = screen.height + 'px';
    
  • Windows 7 Age of Empires II and Age of Empires III doesn't fill the entire screen

    I just finished the installation of Age of Empires II Age of Kings and the Expansion of the Concqerors on my new PC which has Windows 7.  Not only am I have problems of color with Age of Kings II, both games II and III will not fill my 27-inch (1920 x 1080) monitor.  I set the screen resolution and downloaded the latest driver for my GTX 580 of NVIDEA but nothing seems to work.  How can I solve the problems of color with Age of Kings II and how can I solve the problem with the games only using the central part of my monitor and leaving a lot of black space on both sides.  Y at - it a patch from microsoft for these questions?  If this is not the case, there should be.  Help, please.

    This is not a gambling problem. These old games only were not aware that future screen sizes might be greater than 640 x 480, probably 800 x 600 or 1024 x 768 (high end!). So there not in the set of options to set the display in today HD resolution. This adjustment can now be done by the video card driver that must be able "to scale", or you will enjoy with the size of the screen not interpolated, original (on a screen 1920 x 1080, which will only be part of your actual screen). I do not have an NVIDIA card, on my AMD card, 'scaling' option is an Advanced Catalyst Control Center setting, there should be something similar in the controls of your card.

  • Page of Bing yesterday filled the entire screen; no icons, bookmarks.

    Yesterday, all of a sudden, the 'Bing' page lists of Firefox. No icons; No favorites. Even the URL of the site is visible only when I dragged out of the upper part. Now, it is impossible to come and go to my site by email to my other programs such as word and excel. So now I'm stuck with Internet Explorer. I would go back to Firefox as it was, with the shortcuts all visible and usable with the icons of the programs.

    Make sure that you run not Firefox mode full screen (press F11 or Fn + F11 to toggle; Mac: Ctrl + Shift + F).
    If you are in full screen view then hover over with the mouse upward to make the bar appear Navigation and tab bar.
    You can click the maximize button in the upper right to leave the mode full screen or empty space of a right-click on a toolbar and use "exit full screen" or press F11.

    Make sure the toolbars like the toolbar 'Navigation' and the 'personal bar' are visible: "view > toolbars".

    • Is he missing elements then open the window customize via "view > toolbars > customize" or "Firefox > Options > toolbars»
    • If a missing element is located in the toolbar palette and then bring her back in the window customize the toolbar
    • If you don't see an item on a toolbar and in the toolbar palette, then click on the "Restore default" button to restore the default toolbar set up.
  • When I go to my homepage to another site I get now two screens side by side instead of the url I want to fill the entire screen. How can I change this?

    When I open firefox, I go to my home page. Then when I go to a site that I booked marked this site come up on top of the left side of my screen then on the right side of my screen is always my home page. already my homepage would be replaced by the new page I went. How to get back to what I had previously? I am running 3.6.17 - I've not being updated because the new version of fire fox says he won't run the plug ins that I use

    Opening in the sidebar is the default value for the bookmarks created via a link or a button on a Web site.

    You can view the properties of a bookmark using the context menu in the side bar (Ctrl + B; Cmd + B on Mac).

    In the Bookmark Manager (bookmarks > organize bookmarks) you can click on the button more in the lower details pane on the right.

    Make sure "Load this bookmark in the sidebar" is not selected.

  • Qosmio G30-201 connected to LCD - how to fit the entire screen?

    Hello

    I have a laptop Qosmio G30 - 201 and also using a Toshiba WLT58 32 inch widescreen LCD with a HDMI connector.
    I'm trying to get the film that I am looking to fill the entire screen and give up the borders.
    Is this possible?
    See you soon

    Steve

    Hello

    Have you checked if there is an option in DVD player software that allows you to watch DVD's? Please check!

    In addition, you can view the properties of the graphics card NVIDIA-> advanced settings.
    You will find a tab called GeForce Go.
    You you must open the table on the side left which provides useful options.
    Go into the settings of device-> adjustment of the device.

Maybe you are looking for

  • After changing the POP IMAP, can I copy POP IMAP Inbox inbox?

    Used POP for years3, Windows 7, GMAIL. Converted to IMAP excellent instructions.The server of GMAIL inbox has still some 10K posts I have long since deletedon my local computer. The POP Inbox reflects the State I want to use. Is it possible to copy t

  • Moving music from external drive

    Here's what I'm trying to do / what I've done. 1 bought new Macmini (fact) 2 transferred old Macmini new information (fact) 3. iPhoto for Photo (actually, a little pain) 4 iTunes library (not done) After taking a while to understand that iphoto photo

  • Qosmio G20, G25: video update possible?

    Is - this qosmio g-series allows video editing?

  • Where are the downloaded videos...

    Hi all.  iPhone on the last IO 9.1 6.  I'm sure that it is a simple and easy question. Wandering on an educational site which offers free downloads of video to allow for viewing not connected to WiFi or data.  When this video would reside for access

  • Aggregate sampling rate

    Hello I'm looking at possible solutions for data acquisition. I use 4 or 5 entries analog and two digital inputs. During the analogue entered most of them will not need sampling extremely quick rate except for one who needs the least 100ks/s. I notic