HorizontalFieldManager position

Hello everyone

How do I position the HorizontalFieldManager at the bottom of the screen?

Thank you

Hello

You can use the screen setStatus() method.

Tags: BlackBerry Developers

Similar Questions

  • a custom positioning of editfield in line with horizontalfieldmanager

    Sorry guys, I guess its easy...

    but I failed to get the position of editfield at a fixed rate x position on the screen.

    I use the horizontalfieldmanager and add a labelfield, then an editfield. that way I can create a form with the addition of several honzontalmanagers. but I want that all editfields to start a same position x and not directly behind the labelfield of each line. in the end, I want to have a block of editfield, starting at a certain position x on the screen?

    where is my mistake? I tried setposition with no luck...

    Thank you very much

    Sven

    Thank you, two solutions helped me and I fixed it very fast

  • How to position a button in a HorizontalFieldManager

    I want to put buttons in my position required that is added to the horizontal field Manager, how do

    I want to change the position of the buttom, how?

    and I want to put the buttons in the center of the horizontal domain manager

    These links will be useful for you to create custom Manager

    http://www.BlackBerry.com/developers/javaknowledge/userInterface/kpa0203190635.shtml

    http://supportforums.BlackBerry.com/T5/Java-development/implement-own-custom-manager/m-p/236133;jses...

  • Want to change the position of the button

    I use HorizontalFieldManager and it it I add 2 buttons 'Add' and 'sub '. So I need to position Center butttons

    How, how to perform the positioning of the button

    You can do this using the method the HorizontalFieldManager setMargin().

    Something like:

    ButtonField btnAdd = new ButtonField("Add", ButtonField.CONSUME_CLICK);
    ButtonField btnSub = new ButtonField("Sub", ButtonField.CONSUME_CLICK);
    
    HorizontalFieldManager btnManager = new HorizontalFieldManager();
    int leftMargin = (Display.getWidth() - btnAdd.getPreferredWidth() -
                      btnSub.getPreferredWidth())/2;
    btnManager.setMargin(0, 0, 0, leftMargin);
    btnManager.add(btnAdd);
    btnManager.add(btnSub);
    

    Concerning

    Bika

  • HorizontalFieldManager problem

    I want to add fields to the horizontalFieldManager by defining their position as

    HorizontalFieldManager never respect the horizontal alignment - of course, because he has his own approach to horizontal placement. The best thing to do then import the JustifiedEvenlySpacedHorizontalFieldManager of

    Implement advanced buttons, fields and managers

    The code has a multitude of other great user interface code, so be sure to keep somewhere very practice.

    You can also experiment with setting the margins on your domains or creating fields of spacer and adding spacers Fluxsol between your gadgets actually used.

  • Question of width for HorizontalFieldManager nin BB OS 6.0 and 7.0

    Hi all

    I developed a new application for BB OS 5.0, 6.0 and 7.0, which in its homepage has a bar containing different categories of navigation. The navigation bar is designed as:

    public HeaderMenu (String [] categories, HeaderMenuListener listCallback) {}
    Super(NO_HORIZONTAL_SCROLL |) NO_HORIZONTAL_SCROLLBAR | FOCUSABLE);
            
    mCategories = categories;
    mNewsListCallback = listCallback;
    mButtons = new CustomButton [mCategories.length];
    noOfCategories = mCategories.length;
    ND = this;
            
    mCategoryNavigator = new HorizontalFieldManager(FOCUSABLE |) HORIZONTAL_SCROLL |       HORIZONTAL_SCROLLBAR) {}

    public int getPreferredWidth() {}
    If (noOfCategories > 1) {}
    navigatorWidth = Display.getWidth () - mLeftNavigator.getWidth () - mRightNavigator.getWidth ();
    return Display.getWidth () - mLeftNavigator.getWidth () - mRightNavigator.getWidth ();
    }
    else {}
    Return Display.getWidth ();
    }
    };
                
    protected void sublayout (int maxWidth, maxHeight int) {}
    Super.sublayout (maxWidth, maxHeight);
    setExtent (getPreferredWidth (), getPreferredHeight());
    };
                
    };
    loadCategoryView();

    mLeftNavigator = new BitmapField (AppResolutionVariables.mLeftNavigationBtn, NON_FOCUSABLE);
    mRightNavigator = new BitmapField (AppResolutionVariables.mRightNavigationBtn, NON_FOCUSABLE);

    If (noOfCategories > 1)
    {
    Add (mLeftNavigator);
    }
    Add (mCategoryNavigator);
    If (noOfCategories > 1)
    {
    Add (mRightNavigator);
    }
    this.setBackground (BackgroundFactory.createSolidBackground (COLOR_MAROON));
    }
        
    /**
    The method of loading of new categories in a scroll handler.
    */
    private void loadCategoryView() {}
            
    int size = mCategories.length;
            
    Added table of buttons representative of the new categories to the Manager of scrolling.
    for (int i = 0; i)<>
    String categoryName = mCategories [i];
    mButtons [i] = new CustomButton (categoryName, DATA_FONT_BOLD, DATA_FONT_PLAIN,
    COLOR_MAROON, COLOR_WHITE) {}
                    
    public int getPreferredHeight() {}
    Return AppResolutionVariables.mLeftNavigationBtn.getHeight ();
    };
                    
    protected boolean navigationClick (int status, int time) {}
    int index = Arrays.getIndex (mButtons, this);
    If (index > = 0) {}
    mNewsListCallback.notifyHeaderButtonClick (index);
    }
    Returns true;
    }
    };
    mCategoryNavigator.add (mButtons [i]);
    }
    }

    Method takes care of asking left and right navigation buttons and scrollable Manager in the correct position.
    protected void sublayout (int maxWidth, maxHeight int) {}
            
    Super.sublayout (maxWidth, maxHeight);
    setExtent (getPreferredWidth (), getPreferredHeight());
            
    If (noOfCategories > 1) {}
    layoutChild (mLeftNavigator, maxWidth, maxHeight);
    setPositionChild (mLeftNavigator, 0, 0);
    }
            
    layoutChild (mCategoryNavigator, maxWidth, maxHeight);
    If (noOfCategories > 1) {}
    setPositionChild (mCategoryNavigator, mLeftNavigator.getWidth (), 0);
    } else {}
    setPositionChild (mCategoryNavigator, 15, 0);
    }
            
    If (noOfCategories > 1) {}
    layoutChild (mRightNavigator, maxWidth, maxHeight);
    setPositionChild (mRightNavigator, getPreferredWidth() - mRightNavigator.getWidth (), 0);
    }
    }

    The question do face is, when I scroll horizontally to the last button at the side bar, the last button is not visible completely, it becomes hidden by the right navigation button on the far right of HFM. This issue is in OS 6.0 and 7.0, but not in OS 5.0.

    Earlier, I had the problem in OS 5.0 so to fix it, I prevail on HFM getPreferredWidth() scrolling above, to return the width (width width HFM - width of navigation left button - not with the right navigation button scrolling) and it works fine. Can someone please fix the problem. Thanks in advance.

    Sorry just looking quickly here.

    The question which I believe is in your sublayout.  You tell your mCategoryNavigator field is the maximum width.  This isn't.  There only the width rest once the buttons have been added.

    There are two ways you can solve the problem.

    The simple way is just to spend the maximum width in the super.sublayout for mCategoryNavigator and no maxWidth.

    But the best way is to remove this sublayout completely and in your sublayout for the Manager.  In this handler, the layout and position your two buttons, then give the drop-down field which remains as its maximum width.

    Two other comments:

    (a) I would like to forget calling super.layout in your HeaderMenu and make everything in your own sublayout.  It would be a good exercise.  Remember the last thing you do is a setExtent, once you have placed all and so that you know how much space you need.

    (b) If you never call super.layout and then do a setExtent to get the correct size, the alarm should sound.  It's a bit like someone who gives a piece of paper, asking them to draw a picture and then decide that in fact the piece of paper is a different size of paper, that they needed to make the drawing.  You are actually asking someone else to do something and then ignoring what they have done (or at least a part of it).  If you find that you need to do, then look for another way as setExtent substitution causes the sorts of problems you found.

  • How to draw and the positioning of images in FieldManager using the method object?

    How can I add and the positioning of my images in the position desired in FieldManagers?

    I need to add more than 2 fields (HorizontalFieldManager/VerticleFieldManager) in my application and I draw an image using the method of painting ovverided.

    NOTE: The image will be established if I do not use mainScreen.add (SeparatorField ()) or mainScreen.add (hori2), see below.

    If I use mainScreen.add (mainScreen.add (hori2) SeparatorField ())... n then the horizontalFieldManger won't be empty, drawn in the output screen.

    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    
    public class BackgroundImage extends UiApplication
    {
        private Bitmap backgroundBitmap;
        private Bitmap fieldBitmap;
    
        int width, height;
    
        public static void main(String[] args)
        {
                BackgroundImage theApp = new BackgroundImage();
                theApp.enterEventDispatcher();
        }
    
        HorizontalFieldManager hori2;
    
        public BackgroundImage()
        {
            //The background image.
            backgroundBitmap = Bitmap.getBitmapResource("jalan_logo.png");
    
            MainScreen mainScreen = new MainScreen();
    
            hori2 = new HorizontalFieldManager();
    
            HorizontalFieldManager horizontalFieldManager = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH | HorizontalFieldManager.USE_ALL_HEIGHT){
    
                //Override the paint method to draw the background image.
                public void paint(Graphics graphics)
                {
                    System.out.println("come to here..!!");
                    width = graphics.getScreenWidth();
                    height = graphics.getScreenHeight();
                    //Draw the background image and then call paint.
                    graphics.drawBitmap(width/2, height/2, 150, 40, backgroundBitmap, 0, 0);
                    super.paint(graphics);
                }            
    
            };
    
            //The LabelField will show up through the transparent image.
            LabelField labelField = new LabelField("This is a label");
    
            //Add the manager to the screen.
            mainScreen.add(horizontalFieldManager);
    
           mainScreen.add(new SeparatorField());
           mainScreen.add(hori2);
           hori2.add(labelField);
    
            //Push the screen.
            pushScreen(mainScreen);
        }
    }
    

    Help, please.

    I have already pointed out the problem with USE_ALL_HEIGHT in first Manager add you to the form. Drop this style bit, otherwise sublayout your screen will generate an exception, and nothing appears!

    If you want HorizontalFieldManager to be of a particular size, regardless of the height of managed fields, replace its sublayout:

    HorizontalFieldManager fieldManagerTopBanner = new
             HorizontalFieldManager()
    {
         protected void sublayout(int maxWidth, int maxHeight) {
            super.sublayout(maxWidth, maxHeight);
            int myDesiredHeight = ;
            setExtent(getWidth(), Math.min(myDesiredHeight, maxHeight));
         }
    
         protected void paint(Graphics g)
         {
              // g.setBackgroundColor(0x000000);//blue
                 g.drawBitmap(100, 150, 100, 200, jlnLogoImg, 0, 0);
    
              //g.clear();
                super.paint(g);
         }
    };
    
  • Align the HorizontalFieldManager field

    Hello

    I have a few problems right align my custombutton in a HorizontalFieldManager.

    I have a simple code like this:

    public class HeaderManager extends HorizontalFieldManager{
    
        public HeaderManager()    {        super(Manager.NO_HORIZONTAL_SCROLL| Manager.NO_VERTICAL_SCROLL|  Manager.USE_ALL_WIDTH | Manager.FIELD_RIGHT);
    
            this.setBackground(BackgroundFactory.createSolidBackground(Color.RED));
    
            ButtonImage mButtonRefresh =  new ButtonImage("refresh",DrawStyle.RIGHT);        mButtonRefresh.setMargin(6, 10,0 ,0);        this.add(mButtonRefresh);
    
        }
    
    }
    

    It's a pretty simple code, but it does not work!

    My Manager to take full width but my field stuck on the left.

    My custom button (ButtonImageGadget) simply extends the field.

    Y at - it a way to make it works or we have an absolute positioning with layoutChild?

    Thanks for your help

    Its a bug in blackberry jde, try the following:

    1. If you want to add only the unique field in this Manager, and then create the domain Vertical instead of horizontal area manager Manager.

    2. If you have two or fields, and all this must be right aligned, and then create a VerticalFieldManager (Manager.USE_ALL_WIDTH |) Manager.FIELD_RIGHT), create a horizontal field Manager add all the fields to this horizontal Manager, and addition of horizontal to vertical Manager Manager

    3. If you have several fields and these should be aligned differently, then please create a horizontal field Manager add fields to this Manager, you want to align to the left. create a verticalfieldmanager using field_right and the entire width. Create fields in this handler with Field.RIGHT or Field.HCENTER style according to your needs.

  • two positioning buttons

    Hello

    I have a horizontalFieldManager h1 which USE_ALL_WIDTH, insidie this h1 is a verticalfieldManager with FIELD_BOTTOM style v1, this v1 has an another horizontalFieldManager h2 that contains two buttons, how can I do first button on the extreme left and the second button on the far right of h2, as shown in the following image

    feniljain wrote:

    You can set the Position of the two buttons in the sublayout of the Manager to add using setPositionChild.

    ... which means 'create your custom manager '. This is exactly what I suggested - but the example of "Advanced UI" has excellent examples of these managers. Study this code will teach you how to create these managers on your own. Moreover, one of the managers that I named is required to provide you with a solution.

  • Detect when HorizontalScroll position changes

    I created a horizontalfieldmanager which takes the width of the screen and allows the user to scroll through the images. Each field of the bitmap is the width of the screen as well. I know there is a getHorizontalScroll method to get the current position of the scroll, but how can I know when to call this method? Is there some sort of reminder that says that when a user navigated to the next focused image?

    Ah I found setScrollListener() and implement the ScrollChangeListener interface.

  • Strange problem with HorizontalFieldManager - it does not show on real device bitmap

    I have a rather strange problem with the HorizontalFieldManager on my Blackberry 8820, which I did not on the Simulator, or done other blackberries that I tried to install my game.

    The problem is that bitmaps that I add, do not appear on the actual device, as in the images below. The code is provided below as well. No idea how to debug, or resolve is appreciated.

    Here's what I see on Simulator and some devices

    Here's what I see on the real blackberry:

    Code:

    ......

    OK, I found the solution - the problem is that there seems to be a bug where you can't put more fields button radio on a horizontal layout manager with 4.2.2.x.

    The solution is to extend the RadioButtonField field and replace the positioning method:

    RadioButtonField radioField = new RadioButtonHack ("", textureGroup, isSelected);

    SerializableAttribute public class RadioButtonHack extends RadioButtonField {}

    public RadioButtonHack() {}
    Super();
    }

    public RadioButtonHack (String label, group RadioButtonGroup,
    Boolean selected, long style) {}
    Super (label, group, selected, style);
    }

    public RadioButtonHack (String label, group RadioButtonGroup,
    Boolean selected) {}
    Super (label, selected group);
    }

    public RadioButtonHack (label As String) {}
    Super (label);
    }

    Protected Sub layout (int width, int height) {}
    int temp = this.getPreferredWidth ();
    setExtent (time, height);
    Super.Layout (time, height);
    }

    }

    resolved http://supportforums.blackberry.com/t5/Java-Development/radiobuttonGroup-related-problem-in-storm/m-...

  • Focus button HorizontalFieldManager on Storm problem

    I have data exploited these forums looking for a solution but found nothing.  The application I've created has a title bar with 3 fields - previous button, label, next button.  Very simple and the layout works very well.  You cannot set the focus to the right button in the simulator of storm.  You can use the keyboard to navigate to it and click back.  But the keys do not work on this button.  If I change the center field to be a button, it works for the Center button.  Never for the right button.  I think it's a bug, but if you know a whole work please let me know.  Here is the code:

             // create previous button, current label, next button        ButtonField prev = new ButtonField("Prev", ButtonField.FOCUSABLE | ButtonField.CONSUME_CLICK);        _label = new LabelField("My Label", Field.FIELD_HCENTER);        ButtonField next = new ButtonField("Next", ButtonField.FOCUSABLE | ButtonField.CONSUME_CLICK);
    
    HorizontalFieldManager header = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH)//HorizontalFieldManager.USE_ALL_WIDTH | HorizontalFieldManager.NO_HORIZONTAL_SCROLL)//HorizontalFieldManager.USE_ALL_WIDTH | HorizontalFieldManager.HORIZONTAL_SCROLL | HorizontalFieldManager.HORIZONTAL_SCROLLBAR | HorizontalFieldManager.RIGHTWARD)// | HorizontalFieldManager.NO_HORIZONTAL_SCROLL)
            {
                 public int getPreferredWidth()
                 {
                       return Display.getWidth();
                 }
                 protected void sublayout( int width, int height )
                 {
                    super.sublayout( width, height );
                    width = getWidth();
                    height = getHeight();               
    
                    Field leftField = getField(0);
                    if (leftField != null && equals(leftField.getManager()))
                    {
                        setPositionChild( leftField, 0, 0);
                    }
    
                    Field centerField = getField(1);
                    if (centerField != null && equals(centerField.getManager()))
                    {
                        int w = (width - centerField.getWidth()) / 2;
                        int h = (height - centerField.getHeight()) / 2;
                        setPositionChild( centerField, w, h);
                    }
    
                    Field rightField = getField(2);
                    if (rightField != null && equals(rightField.getManager()))
                    {
                        setPositionChild( rightField, width - rightField.getWidth(), 0);
                    }
                }
            };
            header.add(prev);
            header.add(_label);
            header.add(next);
            setTitle(header);
    

    Solved!

    Basically my manager should not call super, must call layoutChild before positioning and then affecting the scope of the Manager.  Yes, a lot of questions and unfortunately a lot of code examples on this site that.  Please visit this page on the managers how custom must be written:

    http://www.thinkingblackberry.com/archives/74

  • How to find directions between two locations other than my current position. I finally gave up and use Google Maps.

    In the latest version of cards, there is not apparent until you find directions between two places when or is your current position. In earlier versions, we enter in two places of departure and destination. In the new version, you enter your destination into a search window, but there is no place to enter a starting location. The application assumes that your current place of residence is always your place of departure. It is a remarkable oversight by designers. Am I missing something?

    If you go to maps, you can search for a location. Once you find the place, press the route button. It is from your current location, but if you type on my position, next: you can change the location that you want the management of.

  • iTunes 12.5.1.21 not remember iTunes position and size

    Update iTunes 12.5.1.21.

    Win 10 (v1607) does NOT remember iTunes position and size.

    My system uses two monitors with extended desktop. I would like to put iTunes on the 2 left / top of the page. But after the closure and revival, iTunes always appears in the center of the screen 1 and the original size when updating. She also can't remember the last page of the articles that appeared, for example, Podcasts, applications, etc. When iTunes has been closed. Instead always defaults to the page music.

    Also on launch a screen "Welcome" iTunes with No thanks / OK buttons on bottom is displayed momentarily before displaying the page of music. There is not enough time to read what this screen offers. Looked in the menus to try to find this page to display... no luck.

    Anyone else having these issues?

    Same problem here.  Very annoying.  Each time is like the first time, which is great when you talk about sex, but not when you run iTunes.  All versions up to now has been able to hold its window size and position, but not anymore.  I also find the interface is very slow to boot.

  • Why the my position can be determined using Personal Hotspot?

    I use Personal Hotspot to watch the NFL Sunday Ticket on my laptop. He thinks that my position is in the same place my call sign is located. Therefore, I am unable to watch the same games if I'm physically across the country.

    Personal Hotspot is a function provided by your operator to share your cellular data. Location services, what looks like an app where you are right now.

    On your laptop, NFL Sunday has no idea where you are now, only your phone number. If you have run an NFL app today on your phone, and he asked location services where you are right now, maybe it's different.

Maybe you are looking for

  • App Store not opening

    I have a macbook mid 2012 Pro version of OS X El Capitan current 10.11.1 that the app store is showing an update is available, but I can't get the app store to open, let alone to update!  All I see is a wheel that turns in the top left corner near th

  • Coded frequencies-16 generator control switch

    I feel really lame to ask this, but I can't understand how to connect a code switch to select 16 different frequencies in the generator module. I keep trying to figure out how with a switch output and a generator of output that I can control the gene

  • HP Officejet Pro 8500 A909a series e-mail address to print from an ipad

    Where can I find the e-mail address for my HP Officejet Pro 8500 A909a series so I can use my new HP app on my ipad to my ipad on my printer printing? Tina

  • EA6500 connectivity issues

    I have had this router for about 6 months. The first 3 months were no problem as far as the Internet goes. It seems that, after the last update of the firmware, I started having these problems. I don't know if it is a factor or not. I tried to go bac

  • How can I remove Bitdefender Total Security my Windows 7 system 2015, except by reinstalling Windows?

    BitDefender Total Security 2015, I installed on my Windows 7 system, and I want to remove it.  BitDefender seems designed to prevent users to remove and prevent users to install another security software. Try to remove Bitdefender via the window prog