Relative position of an image in SO5.0

 public static Field getBanner(){
            Background bg = BackgroundFactory.createSolidBackground(Color.WHITE);

            HorizontalFieldManager hfm = new HorizontalFieldManager();

            final Bitmap logo = Bitmap.getBitmapResource("ban_40px.png");
            BitmapField _bitmap1 = new BitmapField(logo);
            _bitmap1.setPadding(10,5,5,65); 

            HorizontalFieldManager vfm = new HorizontalFieldManager(Field.USE_ALL_WIDTH | Field.FIELD_VCENTER);

            hfm.add(_bitmap1);

            hfm.add(vfm);
            hfm.setBackground(bg);
            return hfm;
      }

This is my code. I want to have a banner on the top and it does, but as we have different BB with more than 1 type of screen I want to have the banner in the center of the screen at the top.

Now is on top, but in some BB right in any other BB a little to the left and kills me because I can't find anything about this (lack of atm android )

any help? How can I put a bit of the image on the screen or other objects! Here is a RelativeLayout or something like?

Kind regards!

calculate your padding using Display.getWidth and the size of your image.

Tags: BlackBerry Developers

Similar Questions

  • How can I copy some clipping masks including the relative positions of multiple images?

    I have a number of images of microscope on the same subject that were made under three different conditions. I would like to use clipping masks to crop the images in the same way (the same size, but also the same position relative to the corners/sides of the images. Where it was inconsistent, I made an image to try to explain what I want to achieve (the same portion of each image for each game):

    mask.png

    Thank you, Jacob. I don't know that is easier or more efficient, but I ended up inserting all of the images on top of each other, and copy and paste in place (Ctrl + Shift + V) my rectangle. Then I chose a rectangle and an image and apply the mask (Ctrl + 7) and then sent it to the back with (Ctrl + Shift + []) before repeating.

  • A div is not correctly positioned on an image.

    a page only for the moment.

    http://tdws.azurewebsites.NET/samples/commscaf/

    The problem I have is that the box with the red border is supposed to rest on the top of the image instead of resting in the border.

    I got to the border there to develop according to the browser.   (a background image comes here eventually.)

    sample.jpg

    I have absolute and relative positioning together but do not know how to anchor this box in position over the image.

    Thanks in advance for any comments.

    PS - I put the css code in the document that people can see the code I have.

    #banner {}

    Width: 960px;

    min-height: 300px;

    position: relative; / * to control the absolute positioned child elements * /.

    }

    / * adjust the values of top, left as Req'd * /.

    {#bannerBlock}

    position: absolute;

    top: 150px;

    left: 250px;

    border: crete thick #F00;

    border-radius: 16px;

    background-color: #CCC;

    padding: 5px;

    Width: 300px;

    z-index: 100;

    }

    Nancy O.

  • I understand Divs & relative positioning?

    Hello.

    So, to cut a long story short...

    I'm newbie and immersed in the creation of my first website using all elements of PA, only to find out that this is not a good way because of the nature of the AP
    After a lot of help from this forum (PZ in particular), I decided to do my research some more.

    I always create another site which I assume must really be built in flash (as someone suggested). But as I do not know Flash is not an option. (see design attached).

    The only things I really need at this point would be for the 'get a quote' & 'about', 'contacts' bubbles have reversal says that change color when the mouse passes over to them.

    I tried to find the best way to do this without AP elements.

    (1) create a Div container with the main image for the background, and then insert a table and try to insert the images flown over this way. But after research, I think I should branch out tables and move forward on the path to CSS. Then led me to idea not 2.

    (2) create a Div container with the main image for the background, then insert div and adjust the margins (relative positioning?) to move the divs right places I need bearings. But even once, I read that this method should only be done to tweak a web page and not to structure a page Web could cause problems.

    (3) create a Div container with the main image for the background, then insert Div in a grid like system (see the attachment image of my guides where I place Div), but this seems a more complicated way to do and you end up with some divs with no use and a lot of unwanted code.

    OR do I have reason to think that works?

    (4) apply to a relative positioned Div, set the background image, then place the AP div in Div PR I would use for my bearings? If I did this would be - it then avoid the problem of the divs PA moving in different browsers?

    Or I have it completely wrong and have to go back to the drawing board?

    Your thoughts you know :-)

    Thanks in advance

    Louisa

    Use CSS Sprites or Image Maps for navigation.  Use HTML content anywhere else.

    Don't forget print/graphic design is not the same as the design of web sites.  Every so often designers paint in a corner with a model of design that is too stiff to work on a web site themselves.  Knowing how & where to make adjustments is part of the process.

    The Holy Grail is a web site that:

    • excellent results in all devices & settings,
    • loads quickly,
    • What are web accessible.
    • visually attractive, and
    • rich in interesting HTML content.

    I'd do things differently, but the site is a good example of this.

    http://www.debsofield.com/services/

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    www.Alt-Web.com/
    www.Twitter.com/ALTWEB
    www.Alt-Web.blogspot.com

  • Bug: Façade objects relative position changes when you move the fusion VI on block diagram

    I posted a bug report on the LAVA, here:

    http://forums.lavag.org/front-panel-objects-relative-position-change-when-placing-merge-VI-onto-bloc...

    If someone at home OR can reproduce, can I please get a CAR #?

    Thank you

    -Jim

    Hi Jim,.

    This was reported to R & D (# 139212) for further investigations.  I don't know if it's more embarrassing fall into the range of functions and reorganize the façade or drop out of the front and hope that the code of the Subvi is not disseminated in the block diagram.  Because the code (or orders) are selected after a fall, and you can switch between diagram and panel above all keeping this selection, at least you can move the code as a whole, right?

  • wallpaper will change the position of the image

    HP Pavilion dv7t 2200 - I put one of my pictures as wallpaper, but the position of the image is stuck on "limousine."  I try to choose other positions of the photo and clicking "save changes", but nothing happens - always stays on "stretch".

    Does anyone have a solution for this?

    Well you didn't say what OS your running, but if windows 7, use this link http://h10025.www1.hp.com/ewfrf/wc/softwareList?os=4063&lc=en&dlc=en&cc=us&lang=en&product=3999449 and at the bottom, install the screen background picture position enabler

  • The positioning of the image Windows 7 Home premium 64-bit background will not change

    So I can change my background very well, but the position of the image, I can't. Position as in, tile, stretch, Center, filling and adjustment. I think he's stuck on stretch. I read a bit about it on the forums and some people were saying to install a "facilitator of photo wallpaper". I tried to install this and it did not work. I am not finding other solutions, so I don't know what to do =)

    Good question. Not sure, but it seems to have something to do with the aspect ratio.
    For example -.
    I have pictures on the internet that measure, 2220 x 1476, 960 x 540, 954 x 534, and 700 x 467 pixels.
    and options of wallpaper does not allow for anything other than full screen on any of them.
    The same is true if I convert photos in 1920 X 1080 (the native resolution of my screen).

    However if you use a photo with a resolution that measures say, 800 x 600, 2048 x 1536,.
    (the res native to my camera), it will appear with the different options available in the
    Customize the wallpaper option.

    If I use Photoshop (or similar) to change the size of say, 954 x 534 at 800 x 600 or 1280 x 1024.
    the options are available.

  • Relative position of a form of multi-record Record in a block

    Hi all

    I have a block record multi with number of items displayed in the 16. This block is used to fill the data in the table that can contain 100 records. When I scroll down the block for a record 39 said individual, I get the value of current_record than 39. But how do I know its relative position, that is to say which position he is currently now out of these 16 files that are displayed. Is there a way to manipulate it.

    Version of form: form of Oracle 10 g

    Thanks and greetings

    JaKes

    Hello:

    You can use: TO_NUMBER (Get_Block_Property (: system.cursor_block, CURRENT_RECORD))-TO_NUMBER (Get_Block_Property (: system.cursor_block, TOP_RECORD)) + 1

    Kind regards

  • Position of the image in the Bootstrap model "carousel."

    I thought I would take a shot to boot. There is a starter template in Dreamweaver that does more or less what I want. But I have a problem of tiny design that I can not really the solution. Maybe can someone help?

    I use the included slide show 'Carousel', but I don't think that the proportions of the image should be the same regardless of the size of the viewport. With a large window, I don't want the image in full height, I want not cropped. That's why I added a 'max-height' to the box containing the image. It works very well and the height of the image does never exceed my max value.

    But: the position of the image in the box limited height is not centered vertically. The image is cropped just at the bottom of the box, while I love to crop the top and bottom. I tried many ways to center the image but failed. Normally this wouldn't be a problem for me, but since I am changing the design to someone else, there seems to be something that I don't get.

    This is a simple example of site showing my problem: http://www.linnsideout.se/imgtest/

    That's what I want to with large windows:

    header-1a.jpg

    And that's what I get:

    header-1b.jpg

    Everybody out there is able to tell me the css tricks necessary to center the image vertically at the start of the crop box?

    The way you have the sample is the way it should work. It's because you used the fluid container. If you use just the containing class, you would have cut offs for each device. In this case, you can use the image just for this device.

    Take a look at the use of srcset to load the images. Take a look at the sensitive Images: If you are simply changing resolution, use srcset. | CSS-Tricks

  • Make very small adjustments of position of the image without using a mouse

    First Elements 14.  I want to set the position of a background image used in a title of movement.  I am able to select the background image.  However, the only way to move/adjust the position of the image is to use the mouse.  With the help of the mouse gives me enough "micro movement."  The mouse's movements that are too large.  How to use the keyboard to make the mirco-fine adjustments to the position of the image?

    Thank you.

    Is - this context in the title of the Motion itself? If so, micro adjustments can be difficult.

    However, if you set the background of the title of transparent movement and put the background on the video track below, you can make very specific changes to the background by going to apply effects/Motion and Position adjustment digitally.

  • OBIEE 11 g title view position of the Image

    Hi all

    Is it possible to change the position of the image title vision in OBIEE 11 g. By default the image is coming up on the left side... In my report, I want to display on the right side...

    Guys please help...

    Concerning

    To achieve this, you will need a custom skin (you can change the original file, but I wouldn't have to do this!).

    The control file rendered with regard to the display of the title of the GUI is in the msgdb. This is the/messages/standardviewtemplates.xml. New: Please follow the process to create a custom look and put her updated the standardviewtemplates.xml.

    Changes must be made here:

    Standard:

    
      
        
            
                
                
                

    After the changes:

    
      
        

    Basically you swap the order of the Logo-> title-> title-> help-> Logo helps. This way, you know what is happening in the doce above and do title-> Logo--> help if you want.

    These changes are application-level everywhere where the custom skin is used (or just applciation-wide full stop if you change the original file).

  • How to control the position of an image of hero slideshow lightbox

    How can I control the position of a hero image in a lightbox slideshow?  Everything I've tried has no effect.  I hope I'm wrong, but t that appears when the lightbox option is selected, that there is no control on the position or the image of hero on the Web page.  I my case, I want to push it higher on the page to make room for a great legend.

    Lightbox will appear the image in the Center on the page, if you want to change the position, you must apply some javascript from your end, there is no direct way to Muse to do.

    Thank you

    Sanjit

  • radial gradient with relative positions and absolute RADIUS length

    Hello

    I tried provide a style with a radial gradient in the upper right corner of a control, but apparently the use of relative positions does not work well combined with a length of absolute RADIUS:
    .myStyle{   
        -fx-background-color: radial-gradient(center 100% 0%, radius 8px, red, white);
    }
    place the center of the gradient to the upper left corner, although it must be placed in the upper right corner. If the RADIUS is defined as ratio (10%), the implementation of the pole is correct. Is there a general constraint prevents this works?

    ARO
    Jens

    My guess is that, like the class RadialGradient has a method isProportional which acts on the Center and the RADIUS, as css just implemenets the settings of the proportionality of the RadialGradient as something all or nothing, but that is not documented in the guide of the css.

    http://docs.Oracle.com/JavaFX/2/API/JavaFX/scene/paint/RadialGradient.html#isProportional%28%29
    http://docs.Oracle.com/JavaFX/2/API/JavaFX/scene/doc-files/cssref.html#typepaint

    I would advise you connecting a jira request that documentation or implementation is updated.

    http://JavaFX-JIRA.Kenai.com/

  • Difficulty of positioning of the images using widgets

    First, I will start by saying that I really, really, really want to love this program and work with it regularly. I've been an evangelist for her and love the whole proposition that a design for the Internet much less expensive and much more intuitive. So thanks, Adobe for doing things in the right direction.

    That said, I think Muse is always incredibly full of bugs, and working with her is far from being as smooth as it should be now that users are required to pay a monthly fee. I'm still on the fence about whether to take the plunge at the end of the 30 day trial. (Resolution of this case will go a long way to convince me.)

    Widgets have proven one of the tools more difficult to manage in the arsenal of the Muse, which is what brings me here tonight. The problem I have is the scaling and positioning of the images using the slide show - and have it stay like that.

    I am able to move the image of Heroes (largest) then it is placed and scaled properly, but I can only do this with a single image at a time. As soon as I'll do to evolve a second hero image to match the first one returns to the default size and the introduction and the second is correct.

    As shown in the first selection of the screen, the image of hero on the right is sized correctly to align with the top and bottom of the thumbnail grid.

    Screen Shot 2012-06-20 at 12.16.42 AM.png

    But it will happen only this trick once. All other images of Heroes change size, move to the Center or the float everywhere where they wish, as shown below.

    Screen Shot 2012-06-20 at 12.16.27 AM.png

    It is a model that is extremely frustrating, and if cannot be resolved, I'll have to give up Muse as the solution to this design problem.

    Help, please! (Thank you.)



    OK, I finally diagnosed the problem, the solution was not very intuitive. In fact, I realized only the answer when I went on the site for export as HTML.

    Because the images of Heroes was put across the slightly larger that the suggested size, I discovered that if you go to the assets Panel and right click on the title of the image (which has a small plus sign next to it to indicate the difference in size), it invites you to "import more large size of the image" (maybe this isn't the precise language (, but it is an option that sounds almost exactly like that).

    Once you do this for each image, they are no longer returned to the small size or random placement. They're going where they are supposed to and they seem to stay there.

    So I'm happy to announce, case closed.

  • How to provide relative positioning of containers?

    How to provide a relative positioning of a container which is another container

    If you use Flex 4, use the mx Canvas (not the spark) container and then see this link on the columns in the constraint:

    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=size_position_5.html

    If you are using Flex 3, you can have columns of the constraint on request, (made available 'absolute' =) sign, or containers in canvas.

    Flex 4 does not support the columns of the constraint, except in containers of Flex 3-herites Panel and canvas.

    If this post answers your question or assistance, please mark it as such.

    Greg Lafrance - Flex 2 and 3 certified ACE

    www.ChikaraDev.com

    Training Flex and Support Services

  • Maybe you are looking for

    • Satellite A200-1s 5 charger (AC adapter) is defective

      Hello Several days ago my cell phone charger started broadcasting a few strange sounds like an ACE with a variable harmonic frequency. And at the same time that he stopped to load laptop.It's my favorite laptop and I'm really happy with it except thi

    • Satellite Pro L770-149 - cannot get working Wlan

      Hello I recently rebuilt a Toshiba Satellite Pro L770-149 with windows 7 64 bit, when I installed first the operating system, all the drivers were missing so I installed all of the correct drivers and had run as it was before. Form Apart wireless con

    • Impossible to listen to the music already purchased on Media Player.

      original title: Windows Media Player 11 & files music wma. I bought music online in a few years ago wma format and cannot play in the WMP11.  The supplier said they switched to mp3 format, and WMP 11 does not offer the license management tool. They r

    • EZVPN on PIX v8.0

      If you have a headsite with several clients EZVPN (PIX 501 & 515) connected in a star configuration can you have a remote site connect you to another remote site by using the intra-interface command and change the encryption on the server EZVPN domai

    • Using Oracle ODBC connection to a remote Oracle database gateway

      Oracle 11 g 2RHEL 6.4Someone at - it use the Oracle ODBC gateway to connect to a different Oracle database?  Problems with this configuration?  Where can I get the drivers for Linux ODBC?(I know, "why not use a dblink?" -Well that would be against th