PopUpScreen positioning

Hello, I want to know is possible to place the popupscreens in all the posts where I want?

because it is always in the Center

Concerning

Rakesh Shankar.P

Hi guys, I discovered the reason, because I have not used

this.layoutDelegate (width, height);-this line

If after this particularly in the code, it worked fine.

Concerning

Rakesh Shankar.P

Tags: BlackBerry Developers

Similar Questions

  • LabelFields in the pop-up screen centering

    I am centering a PopUp screen and add a few LabelFields which must be centered too. I put the position of the Popup manually, but the LabelFields aren't always align properly... What have I done wrong?

    The PopupScreen position which focuses more or less now:

    private final static int _X = (Display.getWidth() - 510);
    private final static int _Y = (Display.getHeight() - _Height) >> 1;
    
    public void sublayout(int width, int height) {
            super.sublayout(getPreferredWidth(), Integer.MAX_VALUE);
            setExtent(getPreferredWidth(), getPreferredHeight());
            setPosition(_X, _Y);
        }
    

    These are the LabelFields thereon that are even more on the left side:

    LabelField title = new LabelField("UI Test App",
                    Field.FIELD_HCENTER);
    LabelField version = new LabelField("Version X.Y",
                    LabelField.FIELD_HCENTER);
    
    add(title);
    add(version);
    

    "It seems that the separatorField has a standard in a popup length if you don't customize it?

    Sort of.  In fact, the SeparatorField wants to put in a separator that is as wide as Manager it is in. so, indeed, it will force the Manager to use the full width that it is given.

    One way round this is to limit width is given by the Manager. Here's some code to show how do.  See screen capture for the result.

       public InfoScreen() {
            super(new VerticalFieldManager() {
                public void sublayout(int width, int height) {
                    super.sublayout(Math.min(width, Display.getWidth()/2), height);
                }
            });
            LabelField title = new LabelField("UI Test App", Field.FIELD_HCENTER);
            LabelField version = new LabelField("Version X.Y",
                    LabelField.FIELD_HCENTER);
            ButtonField closeBtn = new ButtonField("Close", ButtonField.FIELD_HCENTER);
            add(title);
            add(version);
            add(new SeparatorField());
            add(closeBtn);
        }
    

    There are other options, for example, you can use the page layout in the SeparatorField to restruct its width.  Then the Director would not forced to use any of its width by the SeparatorField.  The best option will depend on exactly what you are trying to reach and what other restrictions you have.

  • Set the position of a PopupScreen

    Is there a way to define the position of top, on the left of a PopupScreen? SetPosition(x,y) call will throw this error:

    java.lang.IllegalStateException: setPosition called outside the layout

    I use JDE 4.2.1 8800 Simulator.

    Thank you

    Ryan

    Quote from the old forum:

    ligraseac

    Messages: 2
    Join date: Jun 2007

    Screen Popup position
    Posted the: June 29, 2007 05:45
     
    Hello

    How can I set the position of a popup screen? I want to set its position next to a field that has the focus.

    Thank you

    Comments: fjarlier
    Re: Screen Popup Position
    Posted the: 5 July 2007 17:10
     
    Hello

    In your class that extends the PopupScreen, you must override sublayout like this:

    ' public void sublayout (int width, int height) {}

    Super.sublayout (Width, Height);
    setPosition (50,50);
    }

    Because the setPosition can occurs only in the layout method. And then, you can position your PopupScreen anywhere you want.

    For me it works...

    If you have another solution, that I take.

    So long

    Fred

  • Is it possible to change the position of popupScreen when it was posted?

    I need to move a popupscreen in a way that is animated on the screen. IE I want to 'slide' to another location instead of just poping out the window and it redisplay in another location. Is there a way to make something like a "setPostion()", after posting the popupscreen?

    Hey rab.
    Which worked great! Thank you very much!

  • Problem with PopupScreen.updateLayout)

    Hello guys '

    I have a problem with PopupScreen. I'm doing the cursor on the PopupScreen. This popupScreen includes BitmapField with transparent image. And the main screen is BitmapField larger than the size of the screen. I want to move the cursor (PopupScreen) on the BitmapField.

    You see what I'm doing here. And I found the solution how to move PopupScreen since the last post. Now, I am facing the problem when the cursor (PopupScreen) on the left. In other words, when I move the slider to the left, it is not clear previous position. I don't know why.

    It works fine when moves right.

    And it is not clear the previous, when position moves to the left.

    So, you can see the code that I use.

    import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.ui.*;import net.rim.device.api.system.Bitmap;import net.rim.device.api.system.KeyListener;
    
    public class CursorField extends UiApplication {
    
      private InfoPopupScreen progressPopup;    int x = 180;  int y = 120;  ManagedScreen managedScreen;  Bitmap _bitmap1;  Bitmap _bitmap2;  Bitmap _bitmap;   int [] fillTrans = new int[100];
    
      public CursorField() {
    
          _bitmap = Bitmap.getBitmapResource("cursor1.png");        _bitmap1 = Bitmap.getBitmapResource("cursor1.png");       _bitmap2 = Bitmap.getBitmapResource("cursor2.png");
    
          for(int i = 0; i < 100; i++) {         fillTrans[i] = 0xFFFFFF;      }
    
          managedScreen = new ManagedScreen();      pushScreen(managedScreen);    }
    
      private class InfoPopupScreen extends PopupScreen implements KeyListener {
    
          protected void applyTheme() {         //Nothing     }
    
          public boolean keyStatus(int keycode, int time) {         return false;     }
    
          public boolean keyRepeat(int keycode, int time) {         return false;     }
    
          public boolean keyUp(int keycode, int time) {         return false;     }
    
          public InfoPopupScreen(Manager manager){          super(manager);       }
    
          protected boolean navigationMovement(int dx, int dy, int status, int time) {
    
              return true;      }
    
          protected void paintBackground(Graphics graphics) {           graphics.setBackgroundColor(16777215);        }
    
          public void sublayout(int width, int height){         super.sublayout(width, height);           setPosition(x, y);        }
    
          public boolean keyDown(int keycode, int time) {
    
              char key =  net.rim.device.api.ui.KeypadUtil.getKeyChar(keycode, net.rim.device.api.ui.KeypadUtil.MODE_UI_CURRENT_LOCALE);            //To left         if(key == 79 || key == 111) {             x = x - 5;                progressPopup.updateLayout();         }                      if(key == 73 || key == 105) {             x = x + 10;               progressPopup.updateLayout();         }
    
              if(key == net.rim.device.api.system.Characters.ESCAPE) {              this.close();         }         return true;      }
    
          public boolean keyChar(char key, int status, int time) {          return false;     }
    
          public boolean trackwheelRoll(int amount, int status, int time) {         return false;     }
    
          public boolean trackwheelUnclick( int status, int time ) {            return false;     }
    
          public boolean trackwheelClick( int status, int time ) {          super.trackwheelClick(status, time);          return true;      } }
    
      private class ManagedScreen extends MainScreen {      private BitmapField _cursorField;
    
          public ManagedScreen() {
    
              _cursorField = new BitmapField(_bitmap) {             public void paint(Graphics graphics) {                    graphics.setBackgroundColor(16777215);                    super.paint(graphics);                }         };
    
              FlowFieldManager manager = new FlowFieldManager(FlowFieldManager.USE_ALL_HEIGHT | FlowFieldManager.USE_ALL_WIDTH) {               public void paint(Graphics graphics) {                    graphics.setBackgroundColor(16777215);                    super.paint(graphics);                }         };
    
              manager.add(_cursorField);            progressPopup = new InfoPopupScreen(manager);
    
              Bitmap pic = Bitmap.getBitmapResource("background.jpg");          BitmapField picField = new BitmapField(pic);          add(picField);
    
              ButtonField _closeButton = new ButtonField("Push screen", ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER);         _closeButton.setChangeListener(new FieldChangeListener() {                public void fieldChanged(Field field, int context) {                  pushScreen(progressPopup);                }         });
    
              add(_closeButton);        } }
    
      public static void main(String[] args) {      CursorField application = new CursorField();      application.enterEventDispatcher();   }}
    

    I hope you can solve my problem.

    TNX in advance"

    Ttry this...   In paintBackground(), call clear after you set the background color.

  • How to change the position of the BB Menu?

    Hi all
    I would like to know how to change the position of the BB Menu. We made a personalized menu of BB and it appears in the upper right of the screen. I would like to know if it is possible to display the menu in the lower left side. We have checked RIM API, but did not find anything for this. Is there a way to do this? We could use other libraries or specific solution as it is very important for our project.

    Thank you

    Pedro

    It is not possible with the menus built-in mechanism.

    You can provide your own menu, using popupscreen and objectlistfield, for example. You can place this popup where you want.

  • How to catch the absolute position Y field

    Hi all

    There are many field on the screen, he needs to scroll vertically to the browser of the entire domain.

    When the user selects a field, I like to appear a kind of peak near this field.

    However, the problem is that I can't get absolute position in Y field on the screen.

    Here is my source code:

    /*
     * VFMTester.java
     *
     * © , 2003-2008
     * Confidential and proprietary.
     */
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.servicebook.*;
    import net.rim.device.api.ui.container.*;
    
    /**
     *
     */
    public class VFMTester extends UiApplication{
        public static void main(String args[]){
            UiApplication app = new VFMTester();
            app.enterEventDispatcher();
        }
        VFMTester() {
            pushScreen(new AScreen());
        }
    
        class AScreen extends MainScreen
        {
            VerticalFieldManager vfm;
            public AScreen()
            {
                super();
                vfm = new VerticalFieldManager();
                for(int i=0;i<40;i++){
                    vfm.add(new ButtonField("Button" + String.valueOf(i)));
                }
                this.add(vfm);
            }
            public boolean trackwheelClick(int time, int status){
                ButtonField f = (ButtonField)vfm.getLeafFieldWithFocus();
                final int h = f.getContentTop() - f.getManager().getVerticalScroll();
                UiApplication.getUiApplication().invokeLater(new Runnable()
                {
                    public void run()
                    {
                        UiApplication.getUiApplication().pushScreen(new PopupTest(h));
                    }
                 });
               return true;
            }
        }
        class PopupTest extends PopupScreen
        {
            int y;
            PopupTest(int y)
            {
                super(new VerticalFieldManager());
                this.add(new LabelField("Pop up testing"));
                this.y = y;
            }
            public void sublayout(int width, int height){
                 super.sublayout(width, height);
                 setPosition(20,y);
            }
            protected boolean keyChar(char c, int status,int time)
            {
                this.close();
                return true;
            }
        }
    }
    

    Only the first screen, works very well, on the second screen, it will jump to the top of the lower position.

    Thanks in advance.

    Here is my source code:

    Field.getScreen().getFocusRect(XYRect);
    
  • 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.

  • Limit position reached

    I am an active user of this forum, and I love helping people. I was wondering if there was a way around the limit of post, as I help people fairly quickly, often jumping from one position to another so it's difficult to help people with what is happening. Any fix?

    The post limit is in place to prevent ' bots from spamming the forum. Although I've never seen any specific criteria published, over time, you earn more points, the limits are relaxed. Be patient.

  • Clip position FCPX to time place

    I may be dumb here, but...

    How to position an element, above the timeline, to a specific place in time (typed in)?

    Thank you

    Simple click on the clock in the viewer and type in your departure time, then the return or enter key. Select a clip or title/generator and type the key "q". Your clip (or selection) will be added to the plot as a clip that is connected from the position of the read head.

    You can simply drag a clip over history (chronology) and while you drag, if the alignment feature is on, it will break at the playhead. If snapping is turned off, press the "n" key down and the clip will break at the playhead. (Slam will also jump to other borders as well, then press and hold n when you get close to your destination).

  • My iphone 5 c (IOS 9.3) sent my incorrect position.

    My iphone 5 c (IOS 9.3) sent my incorrect position. I have 'share my location' with my husband and this day there, he checked my position and it showed that I was about 1 to 1 1/2 miles away at a park (I've never been to). I was home at the time and wifi may have been down, but I can't understand why it was closed so far.

    If there is no wifi, cellular service (I have Verizon) would not in the correct location? I even checked the location history on my phone and it me House shows during this period and shows the whole story to that area of the Park? Which would be so far off the coast?

    Thank you.

    If the phone can't get a current location due to the Internet being down, or in the case that the reception is not good enough to triangulate your location using nearby cell towers, the nearest known position will be displayed. If there is a cell tower near this park, it could also be stated as your position until your appliance again to a new location or the quality of the signal is still improving.

  • Google continues to ask to use my position on my iPhone and the iPad.

    Whenever I search using google my phone/iPad application permission to use my position.  Site settings to allow Google to use my position to the Safary. Both devices are running the latest version of iOS. Help!

    Your question is not clear. You want to allow Google to use location services? If so just leave. Go into the settings... Location-based Services and to allow Google to use.

  • Position reversed in Midi transform does not

    Hello

    I can't make "reverse position" at work

    It is to select 0 events

    "reverse the pitch" is 283 events

    What is the trick?

    Is that still, there is a bug?

    Thanks in advance for your help

    Best

    Cyril

    Just make sure that the start and end positions are set up correctly. Then just press select and operate.

    In the piano roll, so you can see the selection of note happen and make sure it works well.

    It works very well here.

Maybe you are looking for

  • Java games crashing when loading on Satellite Pro C660D

    So I have the Toshiba Satellite Pro C660D for Christmas. The first thing I did as a teenager was to examine the specifications to see if she would be able to reasonably run the games. Care was fine for me. So I installed a few games, Minecraft instal

  • GNU ISO rename

    In the Terminal, I would use the 'rename' command I know on Linux systems. I searched the web and found Homebrew installed, but rename of this package is a Perl, not the binary file script I'm looking for. The syntax of a command line for the utility

  • Claire VF but Rec on ext monitor?

    Claire VF but Rec on ext monitor? Is there a way? I know the Red Rec Stby on top. But the declaration of principles want a clear framework. Thank you

  • 8 flow accidentally uninstalled HP pilot broadband!

    Hello friends and HP! I have a problem. I fished around with my mobile broadband in the Device Manager and accidentally uninstalled the driver! Now, all that I have left is an adapter to wide band generic Mobile that won't turn on (error code 10 this

  • Purpose of "null is not null" and "null is null" statements

    Hi allPlease can someone explain the purpose of these statements and what it means.1 null is not null2 null is null