Overlay in the Manager field

I have a related question to display that I have not been able to answer. It relates the point c below.

Scenario:
Let's say I have 5 cards in hand.
a. I want to display the cards in a row, one next to the other, BUT with the cards overlapping partially (just like how you would hold some cards in your hand while playing a game).
b. once I posted the cards, I want to be able to move the focus from one card to the other as I scroll using the trackball
c. when any card is the focus, I want this card to be superimposed over all cards - in other words, if this card was partially shown because he was behind another card, but, when it gets the focus, it must show itself completely before any other map so that it is completely visible.

I was able to achieve (a) and (b) thanks to the API documentation, and thanks to what I learned from the responses on crackberry forums. To achieve (a) and (b), each of my cards is a BitmapField and I have a Manager customized to help me display and scroll cards.

However, I am NOT able to (c) above. It seems that the Manager (net.rim.device.api.ui.Manager) displays the fields in the same order that they were added to it. So if you add Field1 to the Manager before you always add Field2, then the Manager (Yes, always) displays Field1 below or under Field2 in the event of partial overlaps between Field1 and Field2. I found that the only way to work around this problem was to 'remove' field1 of the Manager and "add" it to have it above Field2 in the display. I find this ridiculous workaround solution because intuitively adding / removing fields from a Manager and fixing these fields display problems seem irrelevant to me. So is - can anyone help with a better solution?

Thank you!

It's still not not clear to me what you want. Manager of application areas are drawn is in default is order of adding to the Manager with drawn up targeted field. For me, it's a quite logical. If you really need, you can change this substituting subpaint handler method and calling paintChild for children of fields in an order that you want. However I don't think that's what you want. For me, it's a lot more easy just add fields to the Manager in the order appropriate to customize the Manager to paint them in the order you want. That is to do something like this

int [] rndm = {1,4,2,0,3};for (int i = 0; i < 5; i++){   mgr.add(new BitmapField(createImage(rndm[i]), Field.FOCUSABLE));}

This way is much better, because the order of default naviagtion is also specified by field addition of order. There is no GOT behind the RIM Manager implementation that can guess the order of presentation of the user interface. Of course you can change it as well by substituting the nextFocus method, but why do you need all this in the first place? It's not clear to me this behavior you want to change in my example. What is the expected behavior? For me it all friendly a), b) and c) restrictions. I missed something?

Tags: BlackBerry Developers

Similar Questions

  • Can't remove the Manager field in AD by IOM 9.1

    Hello
    I'm removing the Manager for a user in the AD profile without changing the Manager ID in the profile of the IOM. I get error when I try to change the attribute Manager replacing a string NULL below.

    LDAP: code error 21-00000057: LdapErr: IDDM-OC090B8A, comment: error in the conversion of attribute operation, data 0, v1db1)


    I get the same error, even if I'm changing the Manager field in AD without changing the Manager field in the IOM.

    I try with the code below.

    BasicAttributes a = new BasicAttributes();
    at.put("Manager","");
    context.modifyAttribute(UserDN,2,at);

    What could be the reason for this error? Please help guys.

    Published by: User_OIM on December 27, 2012 19:06

    Create so first BasicAttribute object and then pass it inside the method could

    BasicAttributes a = new BasicAttributes();
    BasicAttribute ba = new BasicAttribute("manager");
    at.put (BA);
    context.modifyAttribute(UserDN,3,at);

  • Manager Field in AD is not filling

    Hi guys,.

    I installed the connector AD in OIM 11 g 2 and provisioning works very well.

    But the domain manager is not be filled.

    Please let me know how to fill the Manager field also in AD.

    Please check how you stand Manager field in the form of process.

    Are you stand Manager field as just the manager login id? Make sure that the Manager field match the DN of the Manager in the active directory.

    That is to say, you must fill in the Manager field as cn = manager1, dc = example, dc = com

    Please check.

  • move the focus from the field to the Manager

    Help!

    I have a HorizontalFieldManager with some fields inside. When I touch on the hfm, I want that he win the tune-up. Everything is fine with the BlackBerry without a touchscreen. I can scroll all hfms.

    But when I touch on the subject of the focus in the hfm gain the focus and not the hfm. How can I change?

    When I want to get the Manager on the ground and give it focus that nothing changes. Call this.setFocus () in the manager didn't make when press the subject field of the focus. When I touch outside the scope of field, everything is fine!

    I have no idea!

    Can someone help me please?

    Concerning

    When the fields are non-Focus, you can still have a NullField focusable.

    a non-trivial alternative might be to manually indicate the development of the manager through the methods onFocus() and onUnFocus() of the field that is getting the focus

  • problem with the vertical field Manager

    Hello

    My application has a screen. On this, I add a Senior Manager vertical field. I add new labelfields dynamically to this vertical field Manager.  When I give the text in the constuctor of the etiquette field, each of them is the fine display. But when I tried to draw the text to the painting, it does not appear.

    Here is my code...

    vfm = new VerticalFieldManager(VERTICAL_SCROLL | FOCUSABLE);
            for (int i = 0; i < 4; i++) {
                index = i;
                LabelField labelField = new LabelField() {
                    protected void paint(Graphics graphics) {
                        // TODO Auto-generated method stub
    //                  super.paint(graphics);
                        graphics.setColor(Color.BLACK);
                        graphics.drawText(displayString[index], 0, 0);
                    }
                };
                vfm.add(labelField);
            }
            add(vfm);
    

    Please help me find a solution.

    First of all, stop saying that it is VerticalFieldManager who has done something bad for you. It has nothing to do with it.

    You use the index in your LabelField painting method. Use paint value is the current value of the index at the time of the painting. Painting happens way after you have created all your LabelFields, when the index stopped to change and has the last value of the loop variable (in your case, it's 3).

    This, as well as LabelFields width zero (that you seem to have supported) so are the problems of your original code. Store the value of i in your LabelField somehow if you insist on using the table values. If only check out you them once and do not change them, consider creating your LabelFields with the text from this displayString table.

    Even better: as you do not use the LabelField paint, why not create a custom field received a text and paint your smileys and all? Of course, you have to implement available as well, but it's useful even when your smileys will take a different width than the corresponding symbols.

    To summarize: your current approach is bad. Take a step back, work on the design, and then implement.

  • How to add the line of separation in the horizontal field Manager

    I want to get as

    name | Age | year

    all this in a horizontalfield Manager, how to do.

    I used the field separator, comes to the entire screen, such as

    name | Age | year

    |       |

    |       |

    |       |

    How do I solve this problem

    Thank you

    You can also do this by substituting your HorizontalFieldManager sublayout() method.

    As:

            h = new HorizontalFieldManager()
            {
                protected void sublayout( int maxWidth, int maxHeight )
                {
                    int width = Display.getWidth();
                    int height = 30; //height of the manager
    
                    super.sublayout( width, height);
                    setExtent( width, height);
                }
    
            };
    

    Concerning

    Bika

  • How to change the background color of the horizontal field Manager

    How can we tell the background color of the horizontal field Manager (hfm) hanger

    If we should extend and override in ppaint, I tried

    I got color of hfm in tag I added to this

    all give me idea

    Try this:

            HorizontalFieldManager manager = new HorizontalFieldManager()
            {
                public void paint(Graphics graphics)
                {
                    graphics.setBackgroundColor(0x000000FF);//blue
                    graphics.clear();
                    super.paint(graphics);
                }
            };
    

    Concerning

    Bika

  • touch events for several fields in the Manager of several

    In my application... I have a vertical field (VFM) Manager in the screen.

    In this optimization of resources, I inserted 3 manaagers:

    (1) District Manager hfmHeader horizontal (in which I added 1 label (NON_FOCUSABLE) and 1-2 Btns according to the conidtion (tuochEvent FOCUSABLE and overrried all in initlilsing it).)

    (2) District Manager vertical ListField container or TextField or LabelField vfmManager in accordance with the condition.

    ((3) District Manager horizontal hfmButtons containing 6 btns... all tuochEvent FOCUSABLE and overrried initlilsing while the).

    public int getFieldAtLocation (int x, int y)
    {
    XYRect rect = new XYRect();
    int index = getFieldCount()-1;
    While (index > = 0)
    {
    getField (index) .getExtent (rect);
    If (rect.contains (x, y))
    break;
    -the index;
    }
    return to index.
    }

    Second, the click event try something like:

    protected boolean touchEvent(TouchEvent event)
    {
       switch( event.getEvent()  )
       {
            case TouchEvent.CLICK:
              int index = getFieldAtLocation(event.getX(1),
                                             event.getY(1));
              // Ignore click events outside any fields
              if (index == -1)return true;
              Field field = getField(index);
              if(field.equals(bitmapField))
              {
                System.out.println("Bitmap Clicked");
              }
            return true;
       }
       return super.touchEvent(event);
    }
    

    Even when I am using above solution, can't scroll. and click event of the hfmButtons buttons aren't the gt performed.

    Second... If I don't stand... I am able to scroll and executed at least the first 3 buttons click event.

    How can I implement for each button click event in any Manager? Is this possible...

    Can someone please help in this regard. Any suggestion or if possible code snippet will be appreciable.

    Thank you

    Use the snippet for each manager of...

    case TouchEvent.CLICK:
    India = getFieldAtLocation (event.getX (1),)
    event.getY (1));
    If (India! = - 1) {}
    Field fm = getField (India);
    {if (FM. Equals (vfmMain))}
    int index1 = vfmMain.getFieldAtLocation (event.getX (1),)
    event.getY (1));

    If (index1 >-1) {}

    Field = vfmMain.getField (index1);

    check field is instance of the field you want

    {if (Field.Equals (footerManager))}
    Container.isFooterManager = true;
    int index2 = footerManager.getFieldAtLocation (event.getX (1), event.getY (1));

    Search fields in the Manager of this...

    } ElseIf... {

    go on the same cehcking

    } ElseIf {}

    ... like this, go to the control...

    }

    }

  • Assign a spacing equal to the fields in the horizontal field Manager

    Hello

    I add a number of vertical field managers to a horizontal field Manager. Each manager of vertical field has a text with an image under. The text varies in width images in each vertical field Manager seem to have a different amount of space between them. Is there a way to remedy this situation? Joined a raw image in the way that message on the screen. How can I get the same amount of space between each area of the rectangle?

    Thank you

    Here's some code that I received from one of the sessions at the last DevCon.  Should be useful.  Might help explain customer managers too.

    /*
     * EqualSpaceToolbar.java
     *
     * Research In Motion Limited proprietary and confidential
     * Copyright Research In Motion Limited, 2009-2009
     */
    
    import net.rim.device.api.ui.*;
    
    public class EqualSpaceToolbar extends Manager {
    
        private static final int SYSTEM_STYLE_SHIFT = 32;
    
        public EqualSpaceToolbar() {
            this( 0 );
        }
    
        public EqualSpaceToolbar( long style ) {
            super( USE_ALL_WIDTH | style );
        }
    
        protected void sublayout( int width, int height ) {
            int numFields = getFieldCount();
            int maxHeight = 0;
    
            // There may be a few remaining pixels after dividing up the space
            // we must split up the space between the first and last buttons
            int fieldWidth = width / numFields;
            int firstFieldExtra = 0;
            int lastFieldExtra = 0;
    
            int unUsedWidth = width - fieldWidth * numFields;
            if( unUsedWidth > 0 ) {
                firstFieldExtra = unUsedWidth / 2;
                lastFieldExtra = unUsedWidth - firstFieldExtra;
            }
    
            int prevRightMargin = 0;
    
            // Layout the child fields, and calculate the max height
            for( int i = 0; i < numFields; i++ ) {
    
                int nextLeftMargin = 0;
                if( i < numFields - 1 ) {
                    Field nextField = getField( i );
                    nextLeftMargin = nextField.getMarginLeft();
                }
    
                Field currentField = getField( i );
                int leftMargin = i == 0 ? currentField.getMarginLeft() : Math.max( prevRightMargin, currentField.getMarginLeft() ) / 2;
                int rightMargin = i < numFields - 1 ? Math.max( nextLeftMargin, currentField.getMarginRight() ) / 2 : currentField.getMarginRight();
                int currentVerticalMargins = currentField.getMarginTop() + currentField.getMarginBottom();
                int currentHorizontalMargins = leftMargin + rightMargin;
    
                int widthForButton = fieldWidth;
                if( i == 0 ) {
                    widthForButton = fieldWidth + firstFieldExtra;
                } else if( i == numFields -1 ) {
                    widthForButton = fieldWidth + lastFieldExtra;
                }
                layoutChild( currentField, widthForButton - currentHorizontalMargins, height - currentVerticalMargins );
                maxHeight = Math.max( maxHeight, currentField.getHeight() + currentVerticalMargins );
    
                prevRightMargin = rightMargin;
                nextLeftMargin = 0;
            }
    
            // Now position the fields, respecting the Vertical style bits
            int usedWidth = 0;
            int y;
            prevRightMargin = 0;
            for( int i = 0; i < numFields; i++ ) {
    
                Field currentField = getField( i );
                int marginTop = currentField.getMarginTop();
                int marginBottom = currentField.getMarginBottom();
                int marginLeft = Math.max( currentField.getMarginLeft(), prevRightMargin );
                int marginRight = currentField.getMarginRight();
    
                switch( (int)( ( currentField.getStyle() & FIELD_VALIGN_MASK ) >> SYSTEM_STYLE_SHIFT ) ) {
                    case (int)( FIELD_BOTTOM >> SYSTEM_STYLE_SHIFT ):
                        y = maxHeight - currentField.getHeight() - currentField.getMarginBottom();
                        break;
                    case (int)( FIELD_VCENTER >> SYSTEM_STYLE_SHIFT ):
                        y = marginTop + ( maxHeight - marginTop - currentField.getHeight() - marginBottom ) >> 1;
                        break;
                    default:
                        y = marginTop;
                }
                setPositionChild( currentField, usedWidth + marginLeft, y );
                usedWidth += currentField.getWidth() + marginLeft;
                prevRightMargin = marginRight;
            }
            setExtent( width, maxHeight );
        }
    
    }
    
  • What is the best way to manage fields on a screen to draw in paint () or manage through managers and their layout() method?

    Hi all,

    Sorry if this is a stupid question, but I'm kind of confused because of my friends on my code examination. I just thought that this forum is the right place have the answer

    I develop a very simple screen but I m using feeders to quidon all the placement of objects on the screen.

    I has a high HFM which has 2 tags that is exterme right and the other is on the far left of the hfm screen.this is added to the screen

    There is a value for money including two labels and two basicEditFields.

    There is an another HFM which has two button in what should be at the centre of the screen.

    This button HFM is add in the optimization of the resources that are directly added to the screen

    Now all the alignment of the manipulated by the sublayout methods of the manager.

    According to my friends, I should HAV done this VIA object not via too many Manager and their layouts...

    I want to know are right? or you can suggest a better way?

    Concerning

    In General, having too many managers slows down things. It is generally recommended to have as little as possible nesting Manager.

    That being said, your friend is too complicate things. Managers are there for a reason and you use them for good reasons (to quickly, glancing at your description, this can be done via a single Manager custom without using a lot of nesting of the optimization of the resources/HFM).

    Managers will take care of the tune-up, scrolling, etc.. Fact all through painting is stupid for this use case.

    With the help of de facto managers save time, makes it easily manageable code, reduced the number of errors and makes things simpler to support/extend in the future.

    There are cases where the surrogate object and made everything yourself is preferable, is not. For this particular case, your friend is wrong.

  • How to disable the password field in the management of Oracle users

    Hello

    How to customize the field password on the user - define the uneditable form? I tried customizing the forms on this field, but it did not work. Can we have an idea if this field can be customized at all

    Thank you in advance!

    See if it works for you. I tested and it's ok

    Raises the event - a TIME NEW POINT INSTANCE
    Trigger - USER object. USER_PASSWORD
    The two process - mode

    Action type - property
    Object Type - point
    Target - USER object. USER_PASSWORD
    Name of the property - ACTIVE (APPLICATIONS COVER)
    -False

    Save and open/close both forms. In the modes entry or query, whenever the user access the password field, it is disabled and cannot be changed.

    I hope that it works as expected. Just play :-)

  • Is there a a way to view again the description field by clicking on the gold star near the url (useful for typing memos on this site)?

    In previous versions of Firefox, when you click on the star next to the url, you can add this site to your Favorites. Another click and you can edit some fields on this bookmark, URL, file, etc...

    But with FF17, the Description field is gone. You can only find when you manage your bookmarks, which is really easy to use.

    Is it possible to add again the description field by clicking on the gold star? It is very useful to add notes about this Web site, and it's also resynchronize it with addins like Xmarks

    Add code to the file userChrome.css below default @namespace.

    Customization files (interface) userChrome.css and userContent.css (Web sites) are located in the chrome folder in the user profile folder.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #editBMPanel_descriptionRow { visibility: visible !important; }
    
  • Hello, I installed Firefox 10.0. Everything worked fine before, but every time I enter a URL that I have to use the mouse and click on the arrow at the end because hitting enter no longer works now in the URL field.

    Hitting enter does not work in the URL field. Instead, I have to click on the arrow at the end of the URL field with the mouse. The problem came just after the upgrade to 10.0. I have the Yahoo toolbar & AVG toolbar (I got two toolbars already though). The fields of research both of the toolbars work when you press on enter. Just not the URL field at the top of firefox.

    Not a problem, happy that we managed to solve the problem

  • Change the focus to the next field in the screen!

    Hi, I have a problem change the focus in the fields, suppose I have a list at least 200 records field and I need to change the focus in the field below (accept button)... remains the path to achieve this? in denavigationde?

    Screen

    -Manager

    -Manager

    TextField - button

    ListView-

    -Manager

    -Button (Accept)

    My screen can be so, but not necessarily be so.

    Thank you, in advance.

    It is relatively easy to divert attention if you know where it's going.  You can just do 'setFocus '.

    It is also relatively easy move focus generically.  For example, in a field, you can do things like

    Manager m = this.getManager ();

    int myIndex = this.getIndex ();

    int managerFieldCount = m.getFieldCOunt ();

    Field nextFocus = null;

    for (int i = myIndex + 1; i)< managerfieldcount="" ;="" i++="" )="">

    Field testField = m.getField (i);

    If {(testField.isFocusable ())}

    nextFocus = testField;

    break;

    }

    }

    If (nextFocus! = null) {}

    nextFocus.stFocus ();

    } else {}

    You can browse to the Manager and get the next field in the Manager of your Manager.

    Hope that gives you some ideas.

  • Get the height of the Manager in advance

    Hello

    In my manager, I add a few fields. But when the configuration of the extensions in sublayout I want to get the right height that the Manager must have in order to display all the fields.

    I tried to use getVirtualHeight(), getPrefferedHeight(), getHeight() methods, but these methods give values after adding fields in the Manager. As I need to have the values at the time of the sublayout, these methods are retune 0.

    No idea how to do?

    What about using getPreferredHeight fields you add?

Maybe you are looking for

  • Satellite C55D - no sound on the TV using an HDMI cable.

    Hello When I connect my laptop via hdmi cable to the TV digital sound is heard through the speakers, but not on TV.It worked well before, not now.Everything is connected, I tested with new cables. It is set up.Devices, it seems that none connected. H

  • Satellite L550 - SMART failure HARD disk reports early - what to do?

    Toshiba Satellite L550-113 At startup, I get a fault HARD drive reporting mini-message soon, and I am asked to by pressing F1 before will continue to Windows (Vista 32 bit). The message of the Toshiba HDD application alert is as follows: Disk0Your HA

  • KQ246AA

    How to test this webcam to see if it works?  I can see the device in the control panel. Thank you

  • Delete BB App World app

    Hi all I downloaded a product Blackberry App World, Blackberry App World Team tested the product and their denied that product. Now I want to remove this product in my product list, I won't submit again. Is it possible, if possible explain it please.

  • Svchost.exe is attempting to establish a connection

    Hello.  Svchost.exe is trying to establish a connection with the IP 46.249.42.193 which is a location of a server in the Netherlands but no name given.  How can I stop my computer trying to connect with an unknown location for unknown reasons.  What