PopupScreen as in an ObjectCho... How do I?

Hi, im making my own ObjectChoiceField, ButtonField-based and now I need to post a popupScreen like the popupscreen in the ObjectChoiceField, so how can I do?...

I need to know only the implementation of the pop-up window (show, loved ones) exactly as in the objectchoice...

I already have the button personalized with choice, etz.

I suggest a listfield

Tags: BlackBerry Developers

Similar Questions

  • How to close a PopupScreen

    Hi, I'm a newbie here.

    I have 1 button on my PopupScreen.I want to click it then to do sth.

    To maintain the display, I use pushGlobalScreen as below:

    UiApplication.getUiApplication().pushGlobalScreen(new pScreen(), 1,true);
    

    then:

    final class pScreen extends PopupScreen implements TrackwheelListener {
    
       public pScreen()
       {
           super(new VerticalFieldManager(),Field.FOCUSABLE);
           ButtonField myButton = new ButtonField("Yes",ButtonField.CONSUME_CLICK | DrawStyle.HCENTER|ButtonField.FIELD_HCENTER);
           add(myButton);
           class addlistener implements FieldChangeListener {
                public void fieldChanged(Field field, int context) {
    //     pScreen.this.close();
    //     UiApplication.getUiApplication().popScreen(pScreen.this);
                 }
             }
             myButton.setChangeListener(new addlistener());
    

    I don't know why I can't use close or anti-pop here to close PopupScreen.

    I saw how - to protect the BlackBerry applications with a password screen.

    And it works on my netbeans and also cannot close the PopupScreen when I press on enter or escape...

    Any suggestion will be appreciated.

    Hello

    You have used an obsolete function so close() method does not work.

    Do not use after the function (what you use now)

    pushGlobalScreen (Screen , priority int, boolean inputRequired)
              Obsolete. Use pushGlobalScreen (int, int

    Use the following function:

    pushGlobalScreen (Screen , priority of the int, int flags)
    Push a global screen.

    I think that the problem is resolved. So resolute and then mark as a solution please...

  • How to remove the global popupscreen?

    Hello everyone,

    I create the application such that when the application starts at the beginning so I put this request

    in the background and then I push the global popupscreen for help

    UiApplication.getUiApplication () .pushGlobalScreen (currentpopupScreen, 1, UiApplication.GLOBAL_MODAL);

    afterwords when I want to delete this global else popupscreen class, I used the following line of code

    UiApplication.getUiApplication () .popScreen (UiApplication.getUiApplication () .getActiveScreen ());

    but this gives the exception because UiApplication.getUiApplication () .getActiveScreen () returns null.

    So how to remove this global popupscreen? because the other class getActiveScreen () method returns null.

    Thanks in advance

    If I push two (or more) screens with the same priority, newest pushed overall appears on top. I tested.

    Thank you for your suggestion.

  • How to start a PopupScreen?

    Hello

    I am facing a strange problem with PopupScreen and how to throw one.

    I try to make a page "load" that is displayed during the execution of a thread.

    I started with a sample code here: http://supportforums.blackberry.com/t5/Java-Development/Sample-Please-Wait-or-Progress-Bar-Code/td-p...

    That's why the way I call the PopupScreen can be weird.

    My problem is that when I want to launch the anti-pop in the constructor of the screen, I have a RuntimeException and when I put it in a ButtonField change event and simulate the click event it works fine.

    So I was wondering what is the difference?

    For your information, this is my code that works:

    public final class ScreenCache extends MainScreen
    {
        Screen s;
        PleaseWaitPopupScreen waitScreen = null;
    
        public ScreenCache()
        {
            super(NO_VERTICAL_SCROLL | USE_ALL_WIDTH);
            s = this;
    
            ButtonField startButton = new ButtonField("Start", ButtonField.LEFT | ButtonField.CONSUME_CLICK);
            startButton.setChangeListener( new FieldChangeListener()
            {
                public void fieldChanged(Field field, int context)
                {
                    waitScreen = new PleaseWaitPopupScreen("Chargement", "Chargement des données");
    
                    ThreadCache _requestThread = new ThreadCache(waitScreen);
                    _requestThread.start();
    
                    UiApplication.getUiApplication().pushModalScreen(waitScreen);
    
                    UiApplication.getUiApplication().popScreen(s);
                    UiApplication.getUiApplication().pushScreen(new ScreenList());
                }
            });
            this.add(startButton);
    
            EventInjector.invokeEvent(new EventInjector.NavigationEvent(EventInjector.NavigationEvent.NAVIGATION_CLICK, 0, 0, 0));
            EventInjector.invokeEvent(new EventInjector.NavigationEvent(EventInjector.NavigationEvent.NAVIGATION_UNCLICK, 0, 0, 0));
        }
    
       protected void paint(Graphics graphics)
        {
            EncodedImage ei = EncodedImage.getEncodedImageResource("img/SplashScreen.png");
            EncodedImage ei2 = new ToolsImage().ResizeImage(ei, Display.getWidth(), 0);
    
            graphics.drawBitmap(new XYRect(0, 0, Display.getWidth(), Display.getHeight()), ei2.getBitmap(), 0, 0);
        }
    
       protected boolean onSavePrompt()
       {
           return true;
       }
    
    }
    

    My PopupScreen is very simple, it only shows text and animated images, so the problem probably isn't there.

    I'm on version 5.0 and I'm on the BlackBerry 9550 Simulator tetsing.

    Try using invokeLater pushModal, anti-pop and pushScreen calls.

    Scott

  • How to copy a text editfield on popupScreen

    I have an editfield on popupScreen and I put a text there, but how I can copy the text and paste it into another application. I don't know it's possible.

    Kind regards.

    You get this free feature if you leave the system adds the elements of the standard menu of fields like BasicEditField.  If you use your own domain, you can use the Clipboard If you want and put things in there and get stuff from there.  See the Javadocs of the Clipboard.

  • How to set the BorderColor of the PopUpScreen

    I have a popupScreen, I want to pop up to be white, although I applied on the white background, I borders of the popupscreen in black and I want to make uniformly white. How to do?

    Concerning

    Rakesh Shankar.P


  • How to remove the border PopupScreen?

    Hello guys '

    I didn't sign my forum probably long ' and have a nice day.

    My request has been completed 90% of the total. Now I'm setting some parts of the user interface.

    So, if know how to delete the border of PopupScreen, please help guys

    TNX'

    It is not documented so it is not supported, but you can extend PopupScreen and override applyTheme().

    protected void applyTheme() {
    
    }
    

    This will create a very simple popup screen.

  • How to move from PopupScreen to screen settings.

    Hi all.

    I have a MyScreen extends screen with a button to display PopupScreen. In PopupScreen, I have the list RadioButtonFields, OK and Cancel buttons. When I click the OK button, the RadioButtonField value will switch to MyScreen but now I don't know how to implement it.

    Please help me.

    Thank you

    Yes, thank you peter_strange. The problem will be resolved if we use the internal class. The MyPopupScreen is an inner class within the MyScreen.

  • How to display a screen on top a popupscreen?

    I have an application popupscreen that when a menu item is selected an implementation by screen screen

    allowing the user set options. However, when it is called the options screen appears behind the popupscreen.

    How 'hide' the popupscreen and give control to the display options?

    I call my screen options in the following way:

    protected _myItem MenuItem = new MenuItem ("configure", 100, 10)
    {
    public void run()
    {
    UiApplication.getUiApplication () .pushModalScreen (new AddItemScreen());
    }
    };

    Is there something wrong in this implementation?

    Hello. Since I had figured this out on my own. Thank you.

  • How to operate the main thread class when PopupScreen is pushed?

    Hi all

    I created shortcut menu custom in my Application. When you click the button, it shows correctly.

    But in my main screen I used webservice. The screen content is watch depends on webservice respons.

    My problem is that when I click on the popup button comes but threat to webservice conversation stops its execution because because of the pop-up screen my screen becomes not developed for execution. and when I remove my mainclass popup screen takes over its performance and result either appears correctly.

    Please, someone tell me how could it be that in the presence of pop-up screen that my thread to call Webservice will be run?

    The approach that I said is the exact stated, so my suspicion is that you have not implemented correctly.

    Here's a way to test.  Add this code in any code that you are is not executed on the event Thread:

    if ( Application.isEventDispatchThread() (
    
    Dialog.alert("Oppsss, this code should not be running on the Event Thread");
    
    }
    

    Of course if you see the dialog box, so that the code runs on the event Thread.

    If you do not, then validate your code, maybe we can find out what you did wrong.

  • How to call the popupscreen from inside menuitem

    I created a single screen. I added a menuitem.

    If this menuitem a popupscreen should be displayed with a click.

    but I'm IllegalThreadStateException. can anyone tell why its happening.

    I use following the line of code

    UiApplication.getUiApplication () .pushModalScreen (new FastTextScreen());

    inside the menuitem run() method.

    waiting for the answer

    Thanks for the reply.

    Oddly, now it works.

    in the sublayout method, I used setPosition(), setExtent() and layoutDelegate().

    Once again thank you.

  • How to eliminate the border for PopupScreen?

    Hi all!

    I am trying to create the ToolTip for the components. I guess I should use pop-up screen for this. But I do not border there. I want just a simple rectangular tooltip. Without any decoration around it.

    I tried to replace protected Sub applyTheme() making it empty. It doesn't help not (tested on emulatros with OSs 4.5 and 5.0)

    Is it possible to do what I want? How?

    Thanks for the replies

    I found only one solution:

    I use the MyPopup class extends screen. Before pushScreen (MyPopup) , I me Display.screenshot (bitmap Bitmap) and draw the Bitmap image as background in paint (Graphics). I paint my background popup by my own and after that called paintChild (graphic design, field) for all children (before that, I adjust their coordinates in MyPopup. ) ( sublayout (w, h)).

  • How can I place a popupscreen against a field in the main screen

    I have a screen (a dialog box, in fact) with a field of inside edition.  I want to show a popupscreen just below the edit field (I put an AutoComplete feature implemented type).  Is it possible to know where in screen coords editing field is so I can call setPosition (in sublayout of the popupscreen) with the right values?

    -Morgan

    It was an interesting idea, and he was able to lead me to where I should be.  Field.getContentRect (), which looked kinda useless, turns out to have useful info when the field is a Manager or a screen. In particular, for the latter, the rect content seems to be in screen coordinates.

    So now I use the following to get the value y from the bottom of the text in my dialog box, which I use to place my pop-up screen:

    Gets the bottom of a field in the coords display to use setPosition appeal of a pop-up screen.

    private int getFieldBottom (field fld)
    {
    int cy = fld.getHeight () + fld.getContentTop ();
            
    Manager m = fld.getManager ();
    While (m! = null)
    {
    CY += m.getContentTop (); for screens, the rect content seems to be in screen coords
    If (m instanceof screen)
    break;
    m = m.getManager ();
    }
            
    Return cy;
    }

  • How to make PopupScreen on the great BitmapField?

    Hello guys '

    Good day. For my application, I need to popupscreen the big BitmapField.

    I use this popupscreen as cursor to the application.

    If I move it, I will solve the problem of cursor.

    You have an idea? Please help me guys

    TNX'

    Please see this post: http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=749&query.id=3575...

  • 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

Maybe you are looking for