setFieldWithFocus on VerticalFieldManager

Hello

I'm developing an application using JDE 4.2.1.

I have created a form, which contain a header and a selectable list by made with a VerticalFieldManager.

Here's how to create the VerticalFieldManager container lines

this._vfmLista = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR){ protected void sublayout(int ancho, int alto) {     ancho = ANCHO_PANTALLA;       alto = ALTO_PANTALLA - _heightOffset - ConstantesIU.SEPARATOR_HEIGHT - ConstantesIU.BOTTOM_MARGIN;        super.sublayout(ancho, alto);     super.setExtent(ancho, alto); }};this.inicializarLista();this._vfmLista.setFocusListener(this);this._libre.anyadir(this._vfmLista, ConstantesIU.LEFT_MARGIN, _heightOffset);

_libre is a custom provision which adds the VerticalFieldManager with the "anyadir" method

The Panel I add to the VerticalFieldManager is a custom panel (MyCustomPanel) that contains an instance of listItem (MyCustomObject)
The Committee draws 2 RichTextFields divided into 2 columns. The first value is fixed, and the second one is editable using a semi-transparent (DialogFieldManager) modal dialog that askes for the value, and then ends with this.close (), so we have calling form looming behind.

The 'inicializarLista' method initializes the contents of the VerticalFieldManager throwing the previous and adding the new content update.
The selection index is managed with the overall "_numSeleccionado" var
This var is updated every time that the user selects an item from the VerticalFieldManager and press 'enter' or 'trackwheelclick '. A modal dialog box appears asking for the value and closes.

private void inicializarLista(){  MyCustomObject listItem;  MyCustomPanel loopPanel;  try   {     this._vfmLista.deleteAll(); //We delete the previous contents of the VerticalFieldManager     if (this._listItemVector == null) //This only runs first time when the listItemVector is empty        {         this._listItemVector = this._actividad.getListData();     }     if (this._listItemVector != null && this._listItemVector.size() > 0)       {         for (int i = 0; i < this._listItemVector.size(); i++)//Iterate the listItemVector          {             listItem = (MyCustomObject) this._listItemVector.elementAt(i);                loopPanel = new MyCustomPanel(listItem);//For each listItem we create a new Panel             this._vfmLista.add(loopPanel);//We add the Panel to the VerticalFieldManager          }         int numSeleccionado = 0;          if(this._numSeleccionado != null)         {                             numSeleccionado = Integer.parseInt(this._numSeleccionado) - 1;//We obtain the previous selection minus one (index from 0 to 9)            }         this._vfmLista.setFieldWithFocus(this._vfmLista.getField( numSeleccionado ));//We give the focus to the field located at "numSeleccionado" position of the VerticalFieldManager       } } catch (Exception ex)  {     Log.getInstancia().escribir("FormList.inicializarLista", "Excepción: " + ex.getMessage());    }}

MyCustomPanel implements the following methods for the manipulation of the update:

private void notifyFocus ( int evento ){   try   {     FocusChangeListener focusListener;        focusListener = this.getFocusListener ();     if ( focusListener != null )      {         focusListener.focusChanged ( this, evento );          focusListener = null;     } } catch ( Exception ex )    {     Log.getInstancia().escribir("MyCustomPanel.notifyFocus", "Excepción: " + ex.getMessage());        }}

protected void drawFocus ( Graphics graphics, boolean activado ){}

protected void onFocus ( int direccion ){ try   {     this.setBorde ( this._borde );        this.notifyFocus ( FocusChangeListener.FOCUS_GAINED );    } catch ( Exception ex )    {     Log.getInstancia().escribir("MyCustomPanel.onFocus", "Excepción: " + ex.getMessage());        }}

protected void onUnfocus (){    try   {     this.setBorde ( null );       this.notifyFocus ( FocusChangeListener.FOCUS_LOST );  } catch ( Exception ex )    {     Log.getInstancia().escribir("MyCustomPanel.onUnFocus", "Excepción: " + ex.getMessage());          }}

protected int moveFocus ( int cantidad, int estado, int tiempo ){   return cantidad;}

public boolean isFocusable (){   return true;}

public Field getLeafFieldWithFocus (){   return this;}

public MyCustomObject getListItem(){ return this._listItem;}

The problem I have is when I return from the modal dialog box and again call the method "inicializarLista".
When I have reconstitute the VerticalFieldManager with the new content, it automatically selects the first item in the Manager of.

Although I use the method setFieldWithFocus to select the previously selected, it keeps selecting the first item.

¿Any hint or anyone having the same problem?

Note: at the moment, I'll try to override the method setFieldWithFocus on the creation of the VerticalFieldManager and to browse all items until I found "the one selected" previously and then call 'setFocus' on it. I'll keep updating if it works.

Thanks in advance!

Resolved.

It was easier than I first thought (I just had a sense of déjà vu )

I made the following changes in the creation of the VerticalFieldManager

private void inicializarLista(){   MyCustomObject listItem;  MyCustomPanel loopPanel;  try   {     this._vfmLista.deleteAll(); //We delete the previous contents of the VerticalFieldManager     if (this._listItemVector == null) //This only runs first time when the listItemVector is empty        {         this._listItemVector = this._actividad.getListData();     }     if (this._listItemVector != null && this._listItemVector.size() > 0)       {         for (int i = 0; i < this._listItemVector.size(); i++)//Iterate the listItemVector          {             listItem = (MyCustomObject) this._listItemVector.elementAt(i);                loopPanel = new MyCustomPanel(listItem);//For each listItem we create a new Panel             this._vfmLista.add(loopPanel);//We add the Panel to the VerticalFieldManager              if(this._numSeleccionado != null)             {                 if(listItem.getNum().equals(this._numSeleccionado))                   {                     loopPanel.setFocus();                 }             }            }     } } catch (Exception ex)  {     Log.getInstancia().escribir("FormList.inicializarLista", "Excepción: " + ex.getMessage());    }}

Instead of setting the focus after the creation of all elements, during the creation of the study group I check whether the current element should receive the focus and then call setFocus on it after the add.

Tags: BlackBerry Developers

Similar Questions

  • How to improve the search function on a VerticalFieldManager that contains custom managers

    I have a screen with a VerticalFieldManager for a list of custom managers holding.

    The screen also contains an EditField that behaves like a search field, when the user enters the text, my app looping through an array of custom managers and compares the text entered with the text of all managers in the table.

    If the text of a Manager matches the input string, I add this handler to the VerticalFieldManager.

    Here are the relevant parts of my code:

    EditField _editField.
    TempBeanPlaces [] _placesList;
    VerticalFieldManager _vfmCellPlaces;

    ....

    This is the constructor of TemBeanPlaces:

    public TempBeanPlaces (String pPlaceName, CellPlaceManager pCellPlaceManager) {}
    placeName = pPlaceName;
    cellPlaceManager = pCellPlaceManager;
    }
    ...

    And this code handles the research:

    _editField.setChangeListener (new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
    String text = _editField.getText () .toLowerCase ();
    _vfmCellPlaces.DeleteAll ();
    for (int i = 0; i)< _placeslist.length;="" i++)="">
    TempBeanPlaces tempBeanPlaces = _placesList [i];
    If (tempBeanPlaces.getPlaceName () .toLowerCase (). IndexOf (Text)! = -1) {}
    _vfmCellPlaces.Add (tempBeanPlaces.getCellPlaceManager ());
    }
    }
    updateLayout();
    }
    });

    This works well when the _placesList table is not too big (length of 50, for example), otherwise the application becomes too slow.

    How can I optimize my code for large quantities of custom managers? For example, in the case, the table contains 600 elements.

    I really need to improve this feature. I just read on the ListField in BlackBerry, but since I have this code, maybe I need to rewrite all with ListFields.

    Thanks in advance!

    The biggest problem with update fields as it is time to layout, fields that are added.  If you add such a moment, then each addition will cause a layout.  Instead, you use addAll to add an array of items, or you can also add all of your items to a single Manager, and then add the Manager.  Then the layout occurs only once.

    In your code, the option would be to add managers selected to a vector, transform the vector into an array, then use addAll.

    You don't need the updateLayout().

    That said, more you add them fields, more processing will be available anyway, then perhaps you are trying to add more elements than even this optimization will execute quickly.  If this optimization does not work enough, then you will need to look in a different way, say 'paging' results, then the display doesn't show that the top 25 and the user can 'add more '.  This 'Exchange' is a good approach in my experience, because users will rarely scroll 25, when they can make another research that could give them better results.

    Finally, and to be on par with the comment of Simon, ListField is an extremely effective area because it is a unique field, so layout is easy, and he's not trying to paint lines until they are actually displayed on the screen.  So in your case, you have three options:

    (1) addAll

    (2) paging

    (3) ListField

    Let us know how you go.

  • Several items in a VerticalFieldManager

    Hello

    I am trying to create a simple screen with images inside. To do this, I'm creating a VerticalFieldManager (although my understanding of the screen itself acts like one) and then to add bitmapfields on opposite corners. However, I believe that only the first bitmap that I add to the screen is displayed. What happens here? I know that the images load properly because I changed the order in which they appear, and it is always true that only the first added to the charges.  Any help is appreciated. Here is my code:

    SerializableAttribute public class MyScreen extends {full screen

    public MyScreen() {}
    VerticalFieldManager _mainManager = new VerticalFieldManager();
    _mainManager.setbackground (BackgroundFactory.createSolidBackground (0));
    Add (_mainManager);
    BitmapField _bitmap;
    Image bitmap _mainmenutop;
    _Cursor bitmap image;
    BitmapField _bitmap2;

    _bitmap = null;
    _bitmap2 = null;

    _mainmenutop = Bitmap.getBitmapResource ("mainmenutop.png");
    _bitmap = new BitmapField (_mainmenutop, BitmapField.TOP
    | BitmapField.RIGHT);
    _cursor = Bitmap.getBitmapResource ("cursor.png");
    _bitmap2 = new BitmapField (_cursor, BitmapField.BOTTOM
    | BitmapField.LEFT);

    _mainManager.Add (_bitmap);
    _mainManager.Add (new SeparatorField());
    _mainManager.Add (_bitmap2);

    }

    }

    Incredibly, the main problem is Field.TOP in your _bitmap!

    I knew that VerticalFieldManager was working well with Field.TOP and Field.BOTTOM, but it was really unexpected.  I wonder how many experts could predict who...

    Then remove the style bits in your Field.TOP _bitmap and make sure that you do not use VerticalFieldManager or screen with VERTICAL_SCROLL (or Field.BOTTOM will send your field up to infinite virtual).

  • problem with verticalfieldmanager?

    _vmanager[0]=new VerticalFieldManager();
             row[0]=new HorizontalFieldManager();
            _lablefield[0]=new CustomLableFeild("Account No:");
            _vmanager[0].add(_lablefield[0]);
            _vmanager[0].add(new CustomManager(0));
            _lablefield[25]=new CustomLableFeild("(If Applicable)");
            _vmanager[0].add(_lablefield[25]);
            row[0].add(_vmanager[0]);
            row[0].add(new SpacerField(0,0));
            _vmanager[1]=new VerticalFieldManager();
            _textbox[0]=new TextBoxField(118,28);
            _vmanager[1].add(_textbox[0]);
            row[0].add(_vmanager[1]);
    

    I am trying to add textfield for this account only, but it did not add.

    pls help me if anyone knows?

    He could have added. If either CustomLableFeild or CustomManager uses the full display width, then _vmanager [0] uses the full display width. In this case, the rest of the fields of _row [0] is positioned beyond the right edge of the screen. Without horizontal scrolling, it's almost as if these fields were not there.

    What classes CustomLableFeild and CustomManager extend? What style value when they are built?

  • Alignment of the center of HorizontalFieldManager in a VerticalFieldManager does not

    using BB JDE 6.0

    Device BB torch

    Simulator for the same

    I have an iVFM(Manager.FIELD_HCENTER |) VerticalFieldManager Manager.USE_ALL_WIDTH), and I have a (Manager.NO_HORIZONTAL_SCROLL) iHFM of HorizoantalFieldManager.

    I have a BMPF1 bitmapfield

    I have a RichTextField RTF1 (RichTextField.TEXT_ALIGH_HCENTER)

    I have added the fields to iHFM

    iHFM.add (BMPF1);

    iHFM.add (RTF1);

    I added the iHFM to the iVFM

    iVFM.add (iHFM);

    the bitmap field corresponds to the far left and the remaining space is occupied by the rich text field with the text aligned in the Center. I tried without TEXT_ALIGH_HCENTER, yet the bitmapfield is at the end left and immediately followed by the text of the RichTextField.

    How to align the center of iHFM horizontally in the iVFM?

    Have not tried this, but you may be lucky if you set the style on your RTF as USE_TEXT_WIDTH where the RTF is expanding to the entire width of the available space and which actually look like everything is left aligned when it actually happens in the whole of the entire screen.

  • Verticalfieldmanager large parchment

    I have a screen, on which I create a scrolling box like this:

    scrollArea = new VerticalFieldManager(Manager.USE_ALL_HEIGHT |) Manager.USE_ALL_WIDTH |
    Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);

    I add several VerticalFieldManagers to the scrolling area. I have an optimization of resources which is very large (several times larger than the physical screen (vertically)).

    My problem is when I scroll on devices such as the 9700.

    As changes in development by the great VFM to another, the page scrolls as the focus changes, but only to the top of the next optimization resources. It is never possible to see the "means" of the great value for money.

    How do I scroll through several VFMs smoothly so that I can see everywhere in the fields on the screen?

    What type of field - what is big enough?

    There are a variety of solutions for this, and the best one will depend on the type of field and the scroll requires you.

    For example:

    Here's a possible solution for a large image.

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-scrollable-image-field/TA-p/444955

    And for a great LabelField, you can convert it into a RcihTextField.

  • Quick question PopupScreen VerticalFieldManager:

    I'm building a contextual menu screen custom that displays two text fields, an OK and CANCEL button.  I use the VerticalFieldManager as the Manager.  I used the styles Field.FIELD_RIGHT and Field.FIELD_LEFT for the OK and CANCEL buttons to the OK button on the left side of the dialog box (under the text fields) and the button CANCEL on the right side.

    The only problem I have with the screen, it is that, since I'm on the VerticalFieldManager, the OK and CANCEL button are on different lines.  Is there a style of field that will put them on the same line, even if I use the VerticalFieldManager?  Or should I use a different Manager.

    Thanks in advance...

    mlisaoverdrive wrote:

    johnbibs wrote:

    Hi mlisaoverdrive,

    By defalt, popupscreen uses the vertical area manager, so that you can do is put two buttons in a HorizontalFieldManager. Then add the Manager of horizontalfield on the screen.

    Wait I'm confused... According to the docs, you must provide a handler delegate for PopupScreen.  Does not mean that it is not a default Manager?

    Sorry my bad, I was talking about the screen. in any case, just use the VerticalFieldManager as your cost of Manager. Then put your buttonFields in a single horizontal FieldManager. then after the addition of some fields in your form, add the horizontalfieldmanager in the last.

  • SpinBoxField is not running after that TouchEvent() method is overridden in the VerticalFieldManager, which is the Parent responsible for SpinBoxFieldManager

    Hello

    JDE - BB JDE 6.0

    Simulator - BB Torch

    Device - BB Torch

    I have a SpinBoxFieldManager (SBFM) with two TextSpinBoxField (TSBF).

    I added the SBFM in a VerticalFieldManager (value for money).

    Normally, this works very well.

    But I had to override the TouchEvent() method for the optimization of resources. (to detect movement sweeping and pop from the screen)

    When I override the TouchEvent() method in the optimization of resources, fields of box two spin (TSBF) does not detect the gesture of blow and never spins.

    What I'm doing wrong here? Need help...

    Hello.. I realized my mistake...

    instead of return false... I need to return the value after letting the super to manage the key event.

    return super.touchEvent(message);
    

    This solves the problem.

  • Static background with VerticalFieldManager

    Hello, I would like to set up a background image for my application, where it must not move even when the user scrolls... I found the following code on the internet for this type of Manager:

    package com.kruger.workflow.gui;
    
    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public class BGVerticalFieldManager extends VerticalFieldManager {
        Bitmap mBgBitmap = null;
        int mBgWidth = -1;
        int mBgHeight = -1;
        int mBgX = -1;
        int mBgY = -1;
    
        public BGVerticalFieldManager(Bitmap background) {
            super(USE_ALL_WIDTH | USE_ALL_HEIGHT | VERTICAL_SCROLL
                    | VERTICAL_SCROLLBAR);
            mBgBitmap = background;
            mBgWidth = mBgBitmap.getWidth();
            mBgHeight = mBgBitmap.getHeight();
            mBgX = (Display.getWidth() - mBgWidth) >> 1;
            mBgY = (Display.getHeight() - mBgHeight) >> 1;
    
        }
    
        protected void paintBackground(Graphics graphics) {
            paintBackgroundBitmap(graphics);
            invalidate();
        }
    
        private void paintBackgroundBitmap(Graphics graphics) {
            if (null != mBgBitmap) {
    
                int x = mBgX
                        + getHorizontalScroll();
    
                int y = mBgY
                        + getVerticalScroll();
                 graphics.drawBitmap(x, y, mBgWidth, mBgHeight, mBgBitmap, 0, 0);
            }
        }
    }
    

    However, does not work... I get the following results:

    As you can see the image begins to scroll backwards...

    The use of this Manager is:

    Bitmap bitmap = Bitmap.getBitmapResource("1.jpg");
            add(mContainer = new BGVerticalFieldManager(bitmap));
            for (int i = 0; i < 100; i++) {
                mContainer.add(new LabelField("List item #" + String.valueOf(i)));
                mContainer.add(new SeparatorField());
            }
    

    Although no result so far... When debugging the code, I noticed that this line:

    if (null != mBgBitmap) {
    
                int x = mBgX
                        + getHorizontalScroll();
    
                int y = mBgY
                        + getVerticalScroll();
                 graphics.drawBitmap(x, y, mBgWidth, mBgHeight, mBgBitmap, 0, 0);
            }
    

    Always returns 0 for both a XY is not assumed that getVerticalScroll or getHorizontalScroll must return aware of gap between the container Manager.? How can I fix this?

    Thank you very much.

    I use a VOR with USE_ALL_HEIGHT and NO_VERTICAL_SCROLL and set the background image to it (using the BackgroundFactory since 5.0)

    in this optimization of resources, I put a second, but it work with VERTICAL_SCROLL. The listfield (or any content) is put there.

  • Custom Manager not correctly rendered after having been added to a VerticalFieldManager in BlackBerry

    I have a VerticalFieldManager that renders a white round rectangle.

    This is the code:

    VerticalFieldManager _vfmBackground = VerticalFieldManager(Manager.NO_VERTICAL_SCROLL | nouveau)
    Manager.NO_VERTICAL_SCROLLBAR | Manager.USE_ALL_WIDTH) {}
    public void paint (Graphics graphics)
    {
    Graphics.Clear;
    graphics.setColor (Color.WHITE);
    graphics.fillRoundRect (10, 10 460, 400, 25.25);
    Super.Paint (Graphics);
    }

    protected void sublayout (int maxWidth, maxHeight int)
    {
    displayWidth = int (Display.getWidth ());
    displayHeight = int (Display.getHeight ());

    Super.sublayout (displayWidth, displayHeight);
    setExtent (displayWidth, displayHeight);
    }

    };

    Then, I created a custom handler named BaseHeaderBlueScreen class that renders a blue rectangle:

    public void paint (Graphics graphics)
    {
    Graphics.Clear;
    graphics.setColor (610212);
    graphics.fillRect (20, 0, Display.getWidth (), Display.getHeight ());
    Super.Paint (Graphics);
    }

    protected void sublayout (int maxWidth, maxHeight int)
    {
    int displayWidth = (Display.getWidth () - 40);
    displayHeight = int ((Display.getHeight () / 2))-90;

    super.setExtent (displayWidth, displayHeight);
    }

    Finally, I add this handler to the VerticalFieldManager with the white rounded rectangle:

    BaseHeaderBlueScreen _vhbs = new BaseHeaderBlueScreen (environment, textBottom, 0);
    _vhbs.setPadding (20,30,0,0);
    _vfmBackground.Add (_vhbs);

    That's how the rectangle blue should be displayed in the white rectangle.

    But it is how the blue rectangle is currently displayed (note the gray space on his left side):

    How do I do to make the blue rectangle, exactly like you want (without the left border gray)?

    Thanks in advance!

    Hi thanks, I just removed object calls these two methods clear() and now it works!

  • verticalfieldmanager will not be available to the child

    private VerticalFieldManager vfm = new VerticalFieldManager( Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR | Manager.FIELD_HCENTER) {
    
            int width = Display.getWidth();
            int height = Display.getHeight() - 80;
    
            public void sublayout(int maxWidth, int maxHeight) {
                super.sublayout( width, height);
                int bagi = (Display.getWidth() - this.getField(0).getWidth()) / 2;
                Field field = this.getField(0);
                setPositionChild(field, bagi, 0);
                setExtent( width, height);
            }
        };
    

    I had a display issue of the provision of the child for verticalfieldmanager.

    available to the child focuses not horizontal on the Manager when creating a fixed size for the Manager.

    someone knows the solution?

    setpositionchild will not solve the problem.

    This code, I think he need to better understand what a Manager should do in the sublayout and the constraints that it works under.

    Let's look at your code:

    ' public void sublayout (int maxWidth, maxHeight int) {}
    Super.sublayout (width, height);
    bagi int = (Display.getWidth () - this.getField (0) .getWidth ()) / 2;
    Field = this.getField (0);
    setPositionChild (field, bagi, 0);
    setExtent (width, height);
    }

    There are a lot of points to note, please bear with me:

    You specify your Manager with Manager.FIELD_HCENTER.  It's trying to tell the Manager you add this in (call it the father Manager), that this child, the Manager must be centered horizontally.  So the father will help this child Manager, then determine how wide the child Manager, then to determine the width of the father is the Director and finally position the child in the Center Manager.  Here, the assumption is that this Manager will have limited space on each side.  If she has in fact that, will depend on the type of Manager, and other fields in it, and how have specified you them.  But this setting in itself might solve your problem.  The fact that it is not suggests there is another problem elsewhere.

    Note that the space provided for the Manager is the maximum that he can use.  As you try to limit the width and the height, in case you, the area you have to play with is bounded by

    (1) a minimum of maxWidth and Display.getWidth () - 80, width and

    (2) minimum of maxHeight and Display.getHeight)

    You should check this before using a value for your treatment.

    You call super.layout (), then actually ignore everything he does, except that it will be layout all fields, this value must be precise:

    this.getField (0) .getWidth)

    But what we don't know is how you asked that area be set up.  For example, they say this field of USE_ALL_WIDTH.  In this case the value of bagi was 0 and means that this Manager cannot hope 'centre' field.

    I recommend that you consult these KB articles for more information on how to program manager.

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

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

    In this particular case, you can actually Center a field in a fair value for money using the FIELD_HCENTER style.  If it does not, then it is probably a problem with the field as an EditField who always takes the entire width.  You will not solve this using your own.

    In addition, in this case, we can actually solve this problem for you.  You can debug this further and determine exactly why the field is not being centered.  Is it because bagi is 0 for example?  I hope that knowing that you will have to review the articles once again will help to debug this.

  • How to show VerticalFieldManager at the bottom of the screen?

    Hello everyone

    I have three VerticalFieldManager as TitleManager, MainManager

    and BottomManager.

    I want to organize these vertically by ensuring that the BottomManager will

    always at the bottom of the screen and is only MainManager

    Functionality of SCROLLING VERTICAL so that the entire screen will not get scrolls.

    This is possible with the BorderLayout, which is not present in the Blackberry development environment

    What could be the best possible solution for this task?

    A lot of useful things, like this, explained here:

    http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644

  • Definition solid background Transparent for VerticalFieldManager

    I use BB JDE 6.0

    Simulator is also the same thing (Blackberry Torch)

    My phone is Blackberry Torch

    I created a verticalfieldmanager two in my screen. (iVFM1, iVFM2)

    I put the bottom of iVFM1 as a background bitmap

    I put the bottom of iVFM2 as a background of solidtransparent (with an alpha 180, color - 0 x 111111 value value), which is placed in the center of iVFM1.

    I added two fields button in iVFM2

    Background MainBG = BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("DriveLinkBG.png"));
    Background ActBG = BackgroundFactory.createSolidTransparentBackground(0x111111,180);
    
    iVFM2 = new VerticalFieldManager(VerticalFieldManager.FIELD_HCENTER | VerticalFieldManager.USE_ALL_WIDTH);
    iVFM2.setBackground(ActBG);
    
    iVFM1.setBackground(MainBG);
    iVFM1.add(iVFM2);
    

    Note: Please find the spare part for images

     

    (1) when I open my application. the iVFM2 has solid experience (no transparency) with the two buttons (attachment: BeforeFocus.png).

    (2) when I select the first button of the part around the button becomes transparent (attachment: AfterFirstFocus.png) and

    (3) when I choose the other key the part around this button becomes transparent too(attachment: AfterSecondFocus.png) [add with the portion who previously became transparent]

    How to do the whole iVFM2 transparent when the screen is pressed

    I found the error.

    I was working with transparent background and a solid border. If the whole bottom was solid.

    Now, I've changed the border to border transparent by setting the alpha value, and his works now.

  • VerticalFieldManager - .setMargin (...). Is it possible to change the color of the margin?

    So I have a margin, but I would prefer it to be white.  Is it possible to change the color of the margin?

    Screen has a bug that is known for a long time with environments.
    Add a verticalfieldmanager, set a background that him and use instead the main Manager of the screens.

    For more information:
    http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644

  • VerticalFieldManager resets the scroll on focus

    I expanded a VerticalFieldManager to manage the scroling and it works well.

    But I have a problem OnFocus

        protected void onFocus(int direction)
        {
            super.onFocus(direction);
            setVerticalScroll(scrollPosition);
        }
    

    When the manager gets the focus sets the vertical slider to 0.

    I checked the value in my method and it is correct.

    How to get around this behavior?

    Thank you very much.

    try to wrap your call in an invokelater

Maybe you are looking for

  • Cannot load your Firefox profile. It may be missing or inaccessible.

    I had downloaded a game, and while he was full I tried to open it in order to play. After I opened my laptop hanged just for long time that I am impatient and decided to restart. Since then, I can't use Mozilla firefox because it does not open, but o

  • How can I restore deleted passwords?

    Using Firefox 26 I tried to copy and paste my words of past but accidentally deleted.How can I restore them? Thank you!

  • Should I wear my watch to bed?

    So, I brought my watch yesterday and update to the latest version of the software, now I wonder if I should sleep with my watch on and if it is drained off the battery. I'll try and see, but like some of the reviews of the apple community.

  • Skype do not sync.

    I installed it on my Mac (OS Mavericks of current) and an Android phone, the Skype application. Also, I use Skype for the Web. The problem I have is that Skype for the Web and my Skype app phones are sync, but is not the desktop version. The last mes

  • How can I convert .txt .doc or .docx? I have no office

    I n ' have MS office, only the Notepad that shows how to save my files as .txt files. Ineed to convert to .doc or .docx format. How can I do this without purching Office? Thanks for any help available!