button not aligned right on all resolutions

Hi all

I show my app logo and a button at the top of the screen. Every thing is just OK but only problm is with the key that has to b align right at a particular positiion on the right side

The problm I face, it's that when I place the button on the desired position, is not on the same place on all handsets

Here is my code

   public  HorizontalFieldManager getField(){

        HorizontalFieldManager hfmc = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH|
                HorizontalFieldManager.USE_ALL_HEIGHT)
        {   

            protected void paint(Graphics graphics) {
                int xForLogoImg = (Display.getWidth()*4)/100;
                graphics.drawBitmap(0, 0, imgTitleBar.getWidth(),imgTitleBar.getHeight()+5, imgTitleBar, 0, 0);
                graphics.drawBitmap(xForLogoImg, 0, imgTitle.getWidth(), imgTitle.getHeight()+5, imgTitle, 0, 0);
                super.paint(graphics);
            }
        };  

        int left = Display.getWidth() /2 +  ((Display.getWidth()*6)/100) ;

        btn.setMargin(0, 0, 0, left);
        hfmc.add(btn);
        return hfmc;
    }

I'll be back a HFM on which my logo is drawn and button is added. I put the left margin of the button as far as I want to b

Its OK 9800 resolution 360 X 480 but on 9780 (resolution 480 x 360) its more to the left and the resolution inc button to move to the left

thnx in advnc to you all

Concerning

Have you looked at the Style Field.FIELD_RIGHT?

It works in places and does not work in other places, everything depends on the Manager.  One place here, I am confident, is not work in HorizontalFieldManagers.  But I think it works OK in VerticalFieldManagers where the optimization of resources has USE_ALL_WIDTH.  Then try to add your touch to an optimization of resources instead of a HFM, field, FIELD_RIGHT.

Aside from that, you are to create a client Manager.  This Manager will be call the layout button, and then ask him what is and use the width of the Manager to determine the position to set the Position of fields.  All things pretty standard Manager however quite intimidating for a beginner to Manager.

You can find more on this in the following:

http://supportforums.BlackBerry.com/T5/Java-development/create-a-custom-layout-manager-for-a-screen/...

and

http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

Tags: BlackBerry Developers

Similar Questions

  • JavaScript not align right

    Hello

    I was wondering if anyone can help, I am sure it is probably something obvious, but on the homepage of my site, I can't changing images box near the top of the page to align to the right of the page, so I can have my chip points to the left of it. If I align right it does not move.

    It is quite a large margin around the box, but if I change auto to 0 or a low number it seems to remove the transition effect.

    Kutbax arboreal entrepreneurs

    Can someone give me a pointer or it is locked?

    Thanks in advance.

    Try something like this:

    • Free Quotations
    • 24 hour emergency call out.
    • All employees fully NPTC Certified
    • Midlands based with national coverage
    • £10m public liability insurance.
    • Woodsman 15x Tracked Whole Tree Chipper

    And use this CSS for your slide show:

    .slideshow {
     height: 400px;
     width: 400px;
     float: right;
     margin: auto;
     overflow: hidden;
     z-index: 0;
    }
    
  • Label field do not align right

    Hello

    The label field is not aligining to the right. Here is my code

    Container {
                            id:database_search_top_container
                            leftPadding: 20.0
                            rightPadding: 20.0
                            preferredHeight: 110.0
                            preferredWidth: 720//displayInfo.pixelSize.width
                            background: recent_container_bg.imagePaint
                            verticalAlignment: VerticalAlignment.Fill
                            horizontalAlignment: HorizontalAlignment.Fill
    
                            layout: StackLayout {
                                orientation : LayoutOrientation.LeftToRight
                            }
                            Label {
                                verticalAlignment: VerticalAlignment.Center
                                horizontalAlignment: HorizontalAlignment.Right
                                id:recent_label_name
                                objectName:"recent_label_name"
                                preferredWidth: 720//displayInfo.pixelSize.width
                                preferredHeight: 110.0
                                text:"Dummy Data"
                                textStyle.color: Color.White
                                textStyle.fontSize: FontSize.Large
                            }
    
                        }
    

    There is a bug in the API. But you can align it to the right this way.

    Container {
        id:database_search_top_container
        leftPadding: 20.0
        rightPadding: 20.0
        preferredHeight: 110.0
        preferredWidth: 720//displayInfo.pixelSize.width
        background: recent_container_bg.imagePaint
        verticalAlignment: VerticalAlignment.Fill
        horizontalAlignment: HorizontalAlignment.Fill
    
        layout: StackLayout {
            orientation : LayoutOrientation.LeftToRight
        }
        Label {
            verticalAlignment: VerticalAlignment.Center
            horizontalAlignment: HorizontalAlignment.Right
            id:recent_label_name
            objectName:"recent_label_name"
            preferredWidth: 720//displayInfo.pixelSize.width
            preferredHeight: 110.0
            text:"Dummy Data"
            textStyle.color: Color.White
            textStyle.fontSize: FontSize.Large
    
            layoutProperties: StackLayoutProperties {
                spaceQuota: 1.0
            }
            textStyle.textAlign: TextAlign.Right
        }
    }
    
  • c:\\windows\system32\rundll.exe please help error message clueless me and computor's not workin right at all

    I have an error message on my desktop saying c:\\windows\system32\rundll.exe ive tried to download a tool to repair, but pc asking what program I want to open again theres none that can run it please help what I do

    Hello

    1. When you receive this error message exactly?

    Method 1:

    This problem occurs because of a missing or corrupted Rundll32.exe file.

    To resolve this issue, follow these steps:

    (a) put the CD ROM of Windows XP disc into the CD-ROM drive.

    (b) click Start and then click Run.

    (c) type expand X: \i386\rundll32.ex_ c:\windows\system32\rundll32.exe in the Open box, where X is the letter of your CD drive.

    (d) restart the computer

    Method 2:

    This problem can also be caused by a virus.

    You can download and run a full scan of the system using the Microsoft Safety Scanner and check if that helps.

    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.

  • Adobe Muse CC does not align justify at all, it seems that the left corner

    In styling the text (in a text box), you can choose a type of alignment. When I choose align: justify nothing happens

    ->

    the text is aligned on the left side. Is there something that bad?

    Hello

    I tried to use Align: justify by selecting the text box and it worked fine at my end. Please look at the screenshot below.

    I advise you to share the screenshot in design mode for a better idea of the size of the text box and the text content.

    Kind regards

    Vivek

  • Can't do not align RTL text in indesign cc, theres no alignment button

    Hi, I can not do not align RTL text in indesign cc, theres no alignment button... I can't find the button alignment... Check the picture of the attachment...

    I already have all the updates

    version: CC 9

    Mac OS El capitan

    Screen Shot 2016-02-07 at 4.55.40 PM.png

    in fact I just reinstalled and changed the language...

    Thanks anyway

  • Equium L20-197 does not light up at all - on button / stop flashes and nothing happens

    Hello

    I own an Equium L20-197 and it currently has a power problem. It does not light up at all. When the device is connected to the machine the orange light comes on to show that there is a power source but when I hit the power button the flash just buttons and nothing happens.

    If I hit him again once all the lights go out and the whole system fails.

    Any ideas on how to solve this problem?

    Thank you
    Alan

    Hello

    Did you put this phone in the standby or hibernation mode?

    Read this description, it seems that the laptop has been in one of these modes and cannot wake up.
    Try to remove the battery from the laptop and unplug the power adapter.
    Several waiting time (~ 20 min) and reconnect the battery and the AC adapter.
    Then try again to put the laptop.

    If she will not be able to boot up the laptop I presume the ESF on the dysfunctions of the motherboard.
    In this case the contact of technicians would be desirable.

  • Mr President, when I do some changes on a page of its buttons on the right side convert (> >) sings two more. What is that this does not happen and the buttons are always visible?

    Mr President.

    When I convert a few changes on a page of its buttons on the right side of the page (> >) sings two more.

    What is that this does not happen and the buttons are always visible?

    Concerning

    Did you try what I suggested?

    listed AFStretchWidth styleclass property of panelGroupLayout and remove the box toolbar tools just use inside grouplayout

    If this does not work please share your xml source

    Thank you

  • & lt; textAlign = MX:label & quot; law & quot; BUT it will not text align right

    Ok
    I work in a text editor... compiling with the command-line.
    I have the following line:
    < mx:Label id = text = "{userRequest.lastResult.xRating"t11"}" x = "745" y = "242" color = "#e48701" fontFamily = "Arial Black" fontSize = "22" textAlign = "right" / > "

    It is, she will NOT ALIGN the text to the right.

    In any case I have suggestions.

    Thank you very much!

    I noticed that you do not have a width defined for the label. My understanding is that this will make the label as big as the text that it contains.

    You may want to increase this size, or no alignment on the enclosing container.

    Paul

  • Captivate 8: button text alignment, where at - it go?

    My work to date to Captivate 8. I work with an old Captivate 7 file.

    When I clicked on a button Transparent alignment policies went from centered on the left. I can't find anywhere to bring back the alignment to centered. Can someone tell me where to find this feature/capability? He was very helpful in Cp 7 whether right below the properties of characters. Now, I don't know where they moved so that it doesn't seem to be a property more.

    AlignmentMissing.jpg

    Text or Transparent buttons always had the possibility to align the button label, not even in previous versions, because they are centered.  If you have installed CP7, can you tell me where you found it? Double just checked that I was pretty sure.

    Can't explain why alignment has changed for you, only suspect it's perhaps in connection with the upgrade of the project. Never had this problem so far, the answer you want to know where you found the alignment option in CP7? Alignment is available for all containers of text such as the legends of text and forms. Since a shape can be used as a button, which is the only button, I know where the alignment can be changed. Of course, you can create Image buttons and adjust the alignment, but then it will be in the graphics application.

  • Update server not responding not photosmart no 410 all-in-one

    Hi all

    I'm new to the blogging and not too computer savvy, so patience please. This problem looks like it's been posted before, but I do not know how to apply it for me.  I have a 410 a printer connected to a minimac running OS x 10.10 (yosemite?). I'm updating the software in order to avoid printing duplicates after turning off the computer. When I go through the procedure to start the update of the printer screen says that it had a problem connecting to the server.

    I tried the IP address of the printer in Safari and Firefox, but as many say server is unresponsive. The server is down, or there's a problem with my setup?

    Help - and thanks

    Hello danny-1,.

    Thank you for visiting the Forums from the HP Support! I see that you are trying to update the printer drivers for your HP Photosmart C410 but you are facing some errors, saying: the server is not responding. I would like you to follow the steps below:

    Scrub / uninstall

    • Open the Applications folder > HP or Hewlett-Packard folder > Uninstall HP
    • Click continue, click on one of the printers in the list.
    • * Only perform this step if you have not all other HP printers. Hold down the command, Option , and command, while now the three buttons.
    • Click on Uninstall.

    Reset the printing system

    1. click on the Apple icon ( ), then click on System Preferences.

    2. in the hardware section, click on Printers and Fax/Scan. The Print & Fax/Scan dialog box opens.

    3. make a right click (or Ctrl + click) in the left panel and then click on reset printing system...

    4. click on OK to confirm the reset.

    5 type the name and the correct password.

    6. click OK to reset the printing system. The printers and Faxes dialog box shows any selected printer

    Note: This will remove all printers in the print and Fax/Scan, any printer deleted can be re-added later by clicking the sign plus (+) symbol...

    Repair disk permissions

    1. on the Dock, click Applications, then utilities.

    2. double-click click disk utility.

    3. highlight your hard drive / partition on the left (by default this is "Macintosh HD").

    4. click on the button to repair disk permissions at the bottom of the window.

    5. once the repair is complete, restart the computer.

    Restart the printer. Now you can download and install the printer software and install it. Click on the link below and follow the instructions on the screen:

    Installation of the OS X v10.10 HP Yosemite of Apple Software Update print driver

    I hope this helps, please let me know the result!

    Thank you

  • Portege R700 - some buttons not response

    Hello

    I bougth Portege R700 and now I'm in trouble.

    the button to turn off the touchpad that does not work.
    the button on the right top of the keyboard (the Green key), do not pass the pc from normal to eco, but open windows Mobility Center.
    When I press th FN key + others like volume, for example, I have no information on the screen.

    also why ligth for wlan is always also activate when
    I disable the WiFi (orange ligth under the touchpad)

    Thank you
    I have reinstall PVAT, but nothing changes.

    Please could you help me to find all the functions of my laptop.

    runs in WIN7 x 64 french.

    Thank you.

    Post edited by: sapeur3873

    There are too many different questions and if you try to fix one, it will take too long and there is no guarantee that you will have success with it.

    Best thing you can do is to restore laptop to factory settings and start using it for laptop with out of the box. After doing this in a first time check it and make sure that everything works correctly.

  • HP Color LaserJet CP1518ni - COLORS NOT ALIGNED

    Has anyone solved this ridiculous question, where all the colors are not aligned when printed?  Black text prints perfectly. But when the printing of the images, the colors are not aligned. Question lasts for months and YES I did the following:

    1. Calibrated thousand times
    2. Restored the default printer 1000 x
    3. Lost my money and has spent nearly $200 on OEM all color cartridges 4... lost!
    4. The drivers reinstalled 1000 x
    5. Have the most up-to-date drivers... believe me.
    6. Ran the printing software HP and doctor Scan and it shows me NO QUESTIONS... ridiculous
    7. Checked the Forum from HP Support with no resolution... I'm with you other people with this same issue. HP HELP PLEASE!
    8. Please tell me that it is a HARDWARE PROBLEM! Of course you won't admit it.
    9. Same problem occurs on my PC - Win 7, Macbook... does not matter... it's the printer!
    10. And finally, I posted this plea for HELP!

    Thank you HP.

    What it sounds like, it's a hardware problem. I would like to begin by ensuring that you have the firmware updated. The firmware of the printer, is what determines how the mechanics of the printer will act. If it has expired, it can cause all sorts of problems. If this does not work, try to do a hard reset. I've included a link to the firmware and instructions for a hard reset below. Let me know what happens.

    Firmware:
    http://goo.GL/gCXvr

    To do a hard reset:
    1. make sure that the printer is turned on.
    2. pull on the power cord from the printer.
    3. pull out the power cord from the wall.
    4. wait for 30 seconds.
    5. plug in the printer and turn it on.

  • Reference Dell v305 problem black cartridge not aligned

    my printer dell 305 said all of a sudden the black cartridge is not aligned properly (otherwise it is said to remove the Strip). If I take the cartridge and reinsert it, I get the same message. If my printer is broken or do I have to just buy a new cartridge?

    scs822,

    Do you use Dell Series 9 ink cartridges?

    If you unplug the printer from the wall and remove the brick of power for 60 seconds, this will reset the error messages that the printer. I would then plug everything back in.

    Turn on the printer.

    Open the printer (power on) and remove the Dell Series 9 black cartridge and then reinstall it. I then remove the Dell Series 9 color cartridge and reinstall it. Now, close the printer, and it will print an alignment page.

    Error messages?

    Print Cartridge black = Black (left) cartridge = color (right side)

    photo cartridge = cartridge black (left side) = color (right side)

    Dell Series 9 ink cartridges have a sensor to them that cannot be reset. Article on Dell ink cartridges filling.

    Dell Series 9 ink cartridges can be purchased at Staples, Wal-Mart or any Dell website.

    It is possible to get an ink cartridge Dell Series 9 with a bad sensor. I would take these to the place of purchase for a replacement.

    Rick

  • D110: Printer Destination does not exist - for D110 all-in-one

    This printer is connected via a Charter Communications wireless router wireless. Printing and scanning has been working well. 2 nights ago he stopped and we started getting the message "the destination printer does not exist" in the window of the printer.

    I am currently working on an iMac 10.6.8 running, but the same thing happened on a Macbook running the same. I just tried on this macbook again and he did print, although he had problems yesterday. Of course I tried earlier once more on the iMac and it did not work. I can print a page of test here, however.

    I tried the following:

    1 remove the printer and selling it.

    2 download a new copy of the driver and install it.

    3. follow the instructions to change the IP address via the web interface, stop the router and printer and then start up the two, router first, then the printer after it increased. relisted to the printer. The iMac certainly sees the printer for purposes of installation and status, but not for printing.

    What now?

    Thank you

    Ellen

    Hi@Ellen_B,

    I see you are having problems printing from Mac. I will definitely do my best to help you.

    Print a Network Configuration page to get the printer IPv4 address.

    Go to settings, wireless, print the Network Configuration Page.

    If you have a valid IPv4 address for the printer, then try and access the Web built-in to the printer server.
    Type the IP address in the address bar of your web browser. (Safari)

    It loads the page Web has?

    Fix permissions of the drive on the Mac:

    Close all applications.

    In the Apple menu, click OK, click Applications, and then click utilities.

    Double-click disk utility.

    Highlight your hard drive / partition on the left.

    Click on check and then repair disk permissions.

    Restart the computer...

    Reset the printing system:

    Note: This will remove all printers in the print and Fax/Scan, any printer deleted can be re-added later by clicking the sign plus (+) symbol.

    Click on the Apple icon and then click on System Preferences.

    Click on Printers & Scanners.

    Make a right click (or Ctrl + click) in the left white side panel, and then click Reset printing system.

    Click OK to confirm the reset.

    Type the name and the correct password.

    Click OK to reset the printing system.

    Then click on the sign to add the driver, highlight the printer +. (you may need to click the drop down menu to select the name of the printer) Then click the Add button.

    If multicast is disabled on the router, you will not be able to add the printer as a Hello device.

    If you encounter network problems, and then add the printer via the IP protocol.

Maybe you are looking for

  • How to stop firefox to load the index of my home folder at startup

    When you start firefox I have the page with an index of all the files and folders in my home folder, including all hidden files. There at the top in a url bar "file:///home/user/ index".

  • Flash player is not installed

    Hello I was using Internet Explorer 9 as my default browser. I downloaded Firefox and all imported via, but Adobe Flash Player is not on Firefox. It is required to manually install the plugin and when I click the icon, it does not install. Since I ha

  • I can't take slow motion videos

    I have a 6 s iPhone and when I got it two days ago, I was able to take slow motion videos but now I can't. The only options I have for camera's picture, square, pano and time are deciduous. Why can't I take videos or slow motions?

  • threatqueerprocessworms

    I received a message that my PC has microsoft security essentials threatqueerprocessworms. Is there such a worm?

  • CD/DVD drive not recognized by Windows all of a sudden

    The opitical drive had been used with problem. I removed a couple of days and when I came back it is no longer listed in "MY Computer". Put everything in the disc drive is not recognized. The drive does not appear on the list th of the material syste