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...

Tags: BlackBerry Developers

Similar Questions

  • How to close a popup screen pushed as a global screen

    I want to close a popup screen but my application is in background so

    UiApplication.getUiApplication () .popScreen (getScreen ());

    or

    UiApplication.getUiApplication () .getActiveScreen () m:System.NET.Sockets.Socket.close ();

    does not work is not something

    same Ui.getUiEngine () .getActiveScreen () m:System.NET.Sockets.Socket.close () does not work...

    in the popup screen, I have a custoListView (written own filed) there is an item when you click on an event

    listner function is called by there, I have to close popup screen... my class is like that

    SerializableAttribute public class SelectSms extends PopupScreen {}

    private vector _data;

    public boolean onClose() {}
    try {}
    Close();
    Returns true;
    } catch (Exception e) {}
    Returns false;
    }
    }

    public SelectSms() {}
    Super (new VerticalFieldManager(), Field.FIELD_VCENTER);
    _data = null;
    _data = MessageStore.getMessage ();
    last post [] message = Message [_data.size (new)];
    MSGC [] CustomListField = null;
    MSGC = new CustomListField [_data.size ()];
    for (int i = 0; i)<>
    message [i] = (Message) _data.elementAt (i);
    MSGC [i] = new CustomListField (message [i] .getMSG_BODY (), message [i] .getMSG_NO (), and [i] .getMSG_STUS ());
    last post mesg = message [i];
    MSGC [i] .setChangeListener (new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
    onClose();
    }
    });
    Add (MSGC [i]);
    }
    can someone help me how to close the popup screen.
            
    }
    }

    Place the UiApplication.popScreen () call in an executable object and pass this object to UiApplication.invokeLater ().

  • How to close the pop-up screen with timer

    Hello

    How to close pop-up display with timer .assuming I want to close pop-up screen after 10 seconds please share code me complete.

    Hello

    See this sample program,

    import java.util.Timer;
    import java.util.TimerTask;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.PopupScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public class Example extends UiApplication {
        public static void main(String[] args) {
            Example app = new Example();
            app.enterEventDispatcher();
        }
    
        public Example() {
            pushScreen(new ExampleScreen());
        }
    
        private class ExampleScreen extends MainScreen {
            public ExampleScreen() {
    
                ButtonField but = new ButtonField("Click",ButtonField.CONSUME_CLICK);
                but.setChangeListener(new FieldChangeListener() {
    
                    public void fieldChanged(Field field, int context)
                    {
                        UiApplication.getUiApplication().pushScreen(new exmplePopup());
    
                    }
                });
    
                add(but);
            }
        }
    
        private class exmplePopup extends PopupScreen
        {
    
            public exmplePopup()
            {
                super(new VerticalFieldManager());
                GuestPop p=new GuestPop();
                add(p);
            }
    
            public class GuestPop extends VerticalFieldManager
            {
                public GuestPop()
                {
                    add(new LabelField("Hi How r u"));
    
                    Timer timer  = new Timer();
                     timer.schedule(new CountDown(), 5000);
                }
    
            }
    
            private class CountDown extends TimerTask {
                public void run() {
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                        public void run() {
                            UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
    
                        }
                    });
    
                }
            }
    
        }
    }
    

    Here, I've given 5 seconds.

    Thank you.

  • close a popupscreen created by listener

    Hi, here is my code. Is it possible to close the popupscreen?

    SystemListener systemlisten = new SystemListener() {
          public void powerOff() {
                    UiApplication.getUiApplication().pushGlobalScreen(new popScreen(), 1,GLOBAL_SHOW_LOWER );
                }
          public void powerUp() {
                    //I wanna close popScreen here.
                }
    

    I know that we can close a popupscreen via UiApplication.getUiApplication () .popScreen (screen), but here how I get the anti-pop screen?

    Any suggestion? Otherwise I hv to change for pushscreen.

    Bika idea will not work, global screens cannot be recovered in this way.

    It should be possible to store a reference to the form in your listener.

  • How to close open applications in Apple Watch (os3)

    How to close open applications in Apple Watch (os3)

    One thing to try-

    Have you tried to close them on the phone by double tapping the home button and then hit swipe to close the iPhone connected?

  • How to close the invitation of calendar or calendar invitation set permissions

    How to close the invitation of calendar or calendar invitation set permissions

    Hi there Anlee9!

    It looks like invitations to other events is not something you want to receive on your iPhone on iOS 9.3.3 5s. I don't like to be interrupted myself, so I have disabled this feature and I'll be happy to show you how also.

    The area you are looking for is actually in the center of Notifications to your iPhone. Tap Settings > Notifications > calendar > Invitations that turns off.

    Have a great day and thank you for the communities of Apple Support!

  • How to close the drop-down menu that I get when I right click on the arrow to the left (to the left of the address bar)? EXHAUST used to do.

    When a tab has a bit of history associated with it, the back and arrows forward near the address bar (IE lefet) opens this story of tabs when clicked.

    But, I can't close this pop-up history.

    In the past, hitting escape close this window. (firefox 14). Now (firefox 27) ESCAPE does not close the window.

    How to close this window?

    (I want to do this via the keyboard and NOT BY SIMPLE CLICK a RANDOM place on the screen.)

    Thank you Gingerbread Man.

    My problem was an extension: MOUSELESS BROWSING.

    I really like this extension, but he did not get a lot of support.

  • How to close the tabs open on android mobile phone?

    I can't access any glasses that I ran out of legs but don't know how to close tabs if no x on the screen. How can I do?

    Next to the address bar is an icon that looks like a stack of paper with a number on it. If you type who, a list of the tabs and you can press the x to close those that you no longer need.

    Does it work?

  • I want to download adobe reader and flash player. Adobe says "Please close firefox fozilla continue ' until it loads. How to close firefox and still no adobe web site?

    How to close the foxfire Web site in order to download adobe reader and flash player?

    How do you close Firefox when you are finished using it?

    Tap the X in the upper right or use Firefox > Exit (or File > Exit).

  • How to close a currency converter opens in the same tab in the sidebar?

    XE currency converter bookmark opens the same thing, but the tab of sharing with the previous site appearing as sidebar. How to cancel this setting, which is now on all consecutive tabs too, currency converter is displayed in all tabs and I don't know how to close it.

    -> Press CTRL + B to open the bookmarks bar

    -> right click on the bookmark appears in the bookmarks bar-> click on Properties -> uncheck load this bookmark in the sidebar -> click on the Save button

    -> To press CTRL + B to toggle the bookmarks bar

    Check and tell if its working.

  • How to close the bookmarks vertical inscription in my browser window?

    How to close the bookmarks vertical inscription in my browser window?

    .. .of RACE! I should have looked more closely, as the 'x' was camouflaged by my wallpaper. Thank you.

  • Again, does not know how to close the Pages and Keynote

    Stats:

    MacBook Pro 15 inch screen Retina, 2.8 GHz Quad - core Intel Core i7, Turbo Boost up to 4.0 GHz, 16 GB of SDRAM 1600 MHz DDR3L memory, 1 TB PCIe-based Flash storage, graphics card Intel Iris Pro + AMD Radeon R9 M370X with 2 GB memory GDDR5, touch trackpad Force.

    Some of my confusion:

    20 year old PC user just crossed over to the MacBook this week. I can't understand how to close things like Pages, Keynote, Notes.

    Also, I can't understand how to add images and make them in separate folders. I'm a travel blog if it is really important.

    Today, I received the 2015 edition of the MacBook for Dummies, but so far it is not helping.

    Any help will be greatly appreciated. Thank you.

    Or, simply use the shortcut command-q.

  • Pavilion a6200n: how to close Internet Explorer to complete installation of Adobe Flash Player update

    I was installing an update to Adobe Flash Player and got a notice to close Internet Explorer to perform the update.  Try as I might, I guess I couldn't close IE because the correct view comes back.  I even changed my IE to Google Chrome, thinking that would surely close IE, but I just kept the advice.  I would be grateful someone tell me how to close IE.

    Yes.  I have apopogize for not specifying the tab 'Prodesses '.  This is where you select Internet Explorer by clicking on it then choocing "End task" in the lower right corner.

  • How to close a cmd window 'call the executable '.

    Hello

    I have the following sequence in the 2013 Teststand

    1. the installation program

    "Call the executable" call a java program in a cmd window. --> This step works

    2 main

    A call to the java program "n" dll .net times--> this step works

    3 cleaning

    How to close the cmd window opened by "executable call?

    TKS

    You can create another not executable call.  The file path is TASKKILL and arguments are "/F /IM cmd.exe/t.  This will close all open windows cmd.

    Pulido Technologies LLC

  • Error: open the-1073807300, probably because of several sessions of VISA. How to close all?

    I have a simple vi that takes a reading of a picoammeter, using the instrument-specific sub-vis. I guess I'm the new opening VISA sessions each time I run it. Recently I get the 1073807300 error: not enough system resources to perform the necessary memory allocation. I tried to add a close command, but I still think I have VISA open sessions.

    Any suggestions on how to close will be much appreciated!

    Is attached to the original vi (picoamm_1) and initialization void / vi if it can help.

    It's all wrong. First of all, you don't have control of IVI resource name. It's the wrong class. Right-click on the entry of the initialize function and select "Create Control". Second, you don't close the IVI sessions because you have wired it correctly. This shift register is just ridiculous. Do NOT wire your control in the loop and return. You want the reference to the session of the function of the loop of wire at the Close function which is in the driver. As it is to wire the session, the loop will be autoindex in a table. Just right click on the exit tunnel and select 'disable indexing. "

Maybe you are looking for

  • HP Pavilion dv6265ca want to install XP

    Hi Pros, Comes to my HP Pavilion dv6265ca comes with Vista everything is OK but I still miss my XP I would install XP on this machine, I go through this forum and got what I need but my question to those who have already tried to install XP on this l

  • Vista Home Premium upgrade to Windows 7

    Problem with Windows Live and DVD Maker. Shows installed but cannot start. To solve these problems and will upgrade is kept, as existing programs and settings.

  • Have a Pavillion DV ^-3250us, Win 7, 64 Bit. WIFI does not illuminate

    Wireless won't turn on; wired connection is fine. HP wireless Asst says that the wireless is activated by the keyboard. Steady orange light & does not illuminate. If I turn off the power & remove the battery, I can get a blue light when I turn on the

  • I can't burn data on cd - r discs.

    I can't burn data on cd - r discs, in the properties that he told me that the drive has no space as soon as I put in & check the properties. The discs are brand new & the pilot says he works correctly. yesterday, I uninstalled the driver 7 rebooted t

  • blue screen 0 x 00190444, 0 x 87740260, 0xc0000102, 0x00000000

    Hello can someone help me? Do not start to my PC and I'm not chkdsk/f Please help me!