How to make a Popup screen

I really need help. I can't find anything specifically about this in the forum. I am very new and everything on the forum talking about things that I don't even understand yet; As the resolution of problems.

I want just a genius to help me do that. I want to click a button and have a smaller popup screen with more buttons of your choice. That's all. Please help someone.

The tutorials already on the site (as pdf files) are not helping. She only gives a big piece of code without explanation. I really need to understand on this.

Hi coilfyzx,

To create your own popupscreen, you must extend the PopupScreen class to your class. And you must provide a handler delegate to this extended class to manage presentations.

public class popupScreen extends PopupScreen implements FieldChangeListener {
      private ButtonField mOKButton,mCancelButton;
      popupScreen(){

          super(new VerticalFieldManager(NO_VERTICAL_SCROLL | USE_ALL_HEIGHT), PopupScreen.DEFAULT_CLOSE);
//here verticalfieldmanager is the delegate manager

       HorizontalFieldManager hfm = new HorizontalFieldManager(FIELD_HCENTER);

        mOKButton = new ButtonField("OK", ButtonField.CONSUME_CLICK);
        mOKButton.setChangeListener(this);//this is to listen for button click event
        hfm.add(mOKButton);
        mCancelButton = new ButtonField("Cancel", ButtonField.CONSUME_CLICK);
        mCancelButton.setChangeListener(this);
        hfm.add(mCancelButton);

// now you can add your buttons here.

      }
/*FieldChangeListener is for button click event in the popupscreen. For this you should implement the method fieldChanged because FieldChangeListener is an interface */

public void fieldChanged(Field field, int context) {
        if (mOKButton == field) {
            //do whatever you want
            close();
        }
        else if (mCancelButton == field) {
            close();
        }
}
//this is for back button on device, when click pop this popupscreen
protected boolean keyChar(char key, int status, int time) {
        if (Keypad.KEY_ESCAPE == key) {
            this.close();
            return true;
        } else
            return super.keyChar(key, status, time);
    } 

Sorry I forgot to add hfm their.

push this screen like below

popupScreen _popupScreen = new popupScreen();
UiApplication.getUiApplication () .pushModalScreen (_popupScreen);

Thank you & best regards

pp

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 make a popup of General Conditions and start the application later

    Hello

    Make a popup terms without white background my static main (String [] args) branches off to an instance of the Application to display the context menu.

    The user then hits accepts the T and C, and then my GUI application should start.

    What I did to start the GUI is to plan the same application and then exit. The next time static hand (String [] args) starts I then branch to the UIApplication and launch my main application.

    It works, but the time for the app restart must be at least 5 seconds.

    Is there a better way to display a popup T and C without white background, and when the user accepts the popup, the GUI starts?

    I can't believe that I fell for it, but...

    I want to dedicated this to all non-believers out there:

    package mypackage;
    
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.Dialog;
    
    /**
     * This class extends the UiApplication class, providing a
     * graphical user interface.
     */
    public class MyApp extends UiApplication implements Runnable
    {
        /**
         * Entry point for application
         * @param args Command line arguments (not used)
         */
        public static void main(String[] args)
        {
            MyApp theApp = new MyApp();
            theApp.invokeLater(theApp);         
    
            theApp.enterEventDispatcher();
        }
    
        /**
         * Creates a new MyApp object
         */
        public MyApp()
        {
    //        // Push a screen onto the UI stack for rendering.
    //        pushScreen(new MyScreen());
        }
    
        public void run() {
    
            pushGlobalScreen(new Dialog(Dialog.D_YES_NO, "T & C", 0, null, Dialog.GLOBAL_STATUS), 1, MyApp.GLOBAL_QUEUE | MyApp.GLOBAL_MODAL);
            System.out.println("This line should be printed only after the dialog is closed");
        }
    }
    

    Remember that you should check the user input and respond accordingly.

    E.

  • How to make a simple screen of Windows 8

    How do you make a simple screen capture in Windows 8?

    E-mail address is removed from the privacy *.

    Hello

    Check this box:

    Use capture tool to capture screenshots
    http://Windows.Microsoft.com/en-us/Windows-8/Use-Snipping-Tool-capture-screen-shots

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • How to make a big screen menu? It is constantly on full screen

    I can't seem to make a big screen menu, and I can't understand why.

    The image is wide. In photoshop, it's the big screen.

    When I burn it and place it on a big screen tv - it is full screen.

    Play video files correctly. Only the menu going to full screen, regardless of the fact that I put the menu in photoshop to 1440 x 1080.

    I created the menu by clicking file-> new menu. Then I open it in Photoshop, where he missed to 720 x 480 (but looks like a square). I have change the canvas at 1440 x 1080 and bring up the menu, but in another, it's a place again.

    What I am doing wrong?

    TIA!

    I see your responses to e-mail, but not here. very weird!  Are just curious, respond you by e-mail or via the web in the forum directly?

    The blank menu means Ann is also a model.

    You ask how do without models.  In photoshop, just keep the size 720 x 480, then go to view-> pixel format and make sure that it is set to 1.21 (D1/DV NTSC widescreen).  You should also pay attention to the question of whether you have Photoshop set to correct proportions or not.  That will not affect how he handles the yet, but it will affect what you see in Photoshop.

    And also, make sure that it is set to 16:9 in yet.

    All your items must have the Sea rights or you get strange results.

    It is possible to do this in Photoshop in square pixels, but we have seen reports of strange results.  I think that those who are probably user error, but now that the programs handle the Fars, why create problems?

    Edit: now that I answered, your messages are here!

  • How to make my top screen resolution

    Hello

    I just bought a monitor 24 inch LG compatible IPS 1920 x 1200 display. However, in my settings, the highest is 1280 x 1024. My graphics card is also new, an MSI NVIDIA GEFORCE GTX 960. My operating system is Windows 7. How can I get my screen resolution up to 1920 x 1200? Helllllllp please.

    For your new 960 GTX you also go to the NVIDIA WWW site and download the current drivers (version 355.98).

    Their website is here and you can get them to automatically detect your GPU and suggest a driver or you can choose to download it yourself:

    http://www.GeForce.com/drivers

  • How to make the touch screen work on W * 8? I have a Toshiba 64 bit PC only 3 years.

    How can I get the touch screen to work on just installed Windows?.  I have a PC from Toshiba 64 bit age of 3 years.

    Is there an online manual for instructions for Windows 8?

    Hello

    Thanks for asking!

    I understand that you want to know how to use the touch screen with Windows 8 feature.

     

    Let me know if I misunderstood.

    1. What is the model of the computer?

    2. the computer has the touch screen feature ?

     

    You should be able to use the touch screen feature when you install the operating system.

     

    If you can not use, then I suggest you to update the driver for the touch screen.

     

    Method 1: update the driver

    1. Place the cursor of the mouse to the upper right and click on search
    2. Type devmgmt.msc and press enter
    3. Now locate the touchscreen device, right-click on it and click Update.

    Method 2: Install the driver in compatibility mode

    If the problem persists, then I suggest you to install the driver for the OS version lower in compatibility mode.

    a. right click on the driver installation file , and select Properties

    b. Select the Compatibility tab

    c. place a check next to run this program in compatibility mode and select the operating system in the drop-down list

    d. let the driver to install, and then check the functionality.

    If there is no touch driver, then I suggest you to contact the manufacturer.

    I hope this helps. If the problem is still not resolved, come back and I'll be happy to help you.

  • How to make a popup, menu utilities Windows Moviemaker, smaller if I can change the length of the duration of the images?

    I am trying to extend the duration of the photos that I have in a project.  The Utilities menu appears giving me access to change the duration, but the pop-up window is so great that I can't at the bottom of the pop-up window to save my changes.  How can I make the window appear smaller in order for me to see the whole window on my monitor?

    It can help to reduce the size of the menu
    If you increase the resolution of your screen.

    Windows Vista - get the best display on your monitor
    http://Windows.Microsoft.com/en-us/Windows-Vista/getting-the-best-display-on-your-monitor

    Windows Vista - change the screen resolution
    http://Windows.Microsoft.com/en-us/Windows-Vista/change-screen-resolution

    As for the duration of the Photo...

    The change of setting to: Tools / Options /.
    Advanced... tab applies only to the added clips
    to the timeline * after * you change the setting.

    If you switch to view "Storyboard" and select
    all of the clips as a batch (select one and the type...
    CTRL + A)... you can add the 'Speed Up, Double.
    or "Slow down, half" effect of changing the
    duration. Simply select all clips / right click
    the effect on the menu... Choose...
    Add to storyboard table.

    'Speed Up, Double' cuts the duration of half.

    "Slow Down, half ' double life.

    These effects can be added up to six times.

    If you need finer adjustment...
    the info may be useful:

    To the timeline, you can change the
    duration for each clip manually. Drag the
    Garnish handle left or right to increase or
    reduce the duration. You can see a
    Tip displaying the change.

    Or... just to redo the project after changing
    the long-term: Tools / Options / Advanced
    tab.

  • How to make Apple Watch screen to return to the normal mode

    I looked at my Apple Watch and noticed the content is super zooms (and I did nothing to make this way - not to play with the settings, etc.). I can barely see the content and I can't navigate to see one of the HMI. If something happened to cause the content to appear in this way, it was not intentional on my part I restarted the clock. She finds the same zoom level. I took a screenshot of the problem, but the screenshot doesn't really show what is on my screen. It shows what the screen is supposed to look like.

    I took some photos of my Apple Watch with my iPhone to help you see the problem.

    Ideas?

    Hello

    Zoom (an accessibility function) has been activated on your watch.

    To disable the Zoom on your iPhone, in the application of the watch, go to: My Watch (low left tab) > General > accessibility > Zoom - put it off.

    It can also be enabled / disabled on your Apple Watch via settings > general > accessibility.

  • How to make default desktop screen after signing in?

    When I log on El Capitan mail automatically window opens. How can I do screen the default screen after my login?

    You should uncheck the option in the closing dialog box:

    And in system preferences > general control, close the windows when you exit an application.

  • How to make my computer screen fit my screen flat tv

    I have a plasma tv that I use for the monitor to my desktop PC. I had an older top office who, after going in the display property, was able to get my big screen.  I just got a new top office and for the life me I can not understand how to operate. I am running xp sp3 and it has the built-in grafix driver intel on it. Who manages the apparently how im aloud to control the configuration of my monitor... Can someone help me get my widescreen display?

    Read the manual of your screen and determine its native resolution.  It's probably either 1366 x 768 or 1920 x 1080.

    Then right click on an empty space on your desktop and select Properties.  Click on the settings tab adjust the slider under "Screen Resolution" left or right so that the value matches the native resolution of your screen.

  • How to make a login screen

    I have an app that will require a connection. Once you start the application, it should show you a login screen. For the moment, I do this with a sheet. How can I have it show the login on the load screen without showing the page slot with the sliding animation? It's fast, but noticeable.

    I use a sheet because I don't want the user to accidentally drag to the main menu and disconnect.

    What is the best option to do this connection function?

    My suggestion would be using the navigation or tabbed pane and handle most of the things through Pages. If you set the property peekEnabled to false in the Navigation pane, then users will be is more capable of scanning left to go back. Leaves are useful for showing long content with only limited actions to the user. Close an 'info' or 'about' leaf having the option would be great examples. Note that when you use map, the Application Menu is not accessible (if you declare in the Navigation pane and want to be accessible from anywhere in the application).

  • How to make a popup alert?

    Can someone tell me how to create an alert that is displayed on the home screen? Or even the creation of a popupscreen that allows you to see the homescreen behind him as some applications use to their EULA when you first run them.

    You can read this article which will no doubt help you!

    http://goo.GL/vmTJ

  • How to make Windows 7 screen saver 'Photos?' display the name of pictures or pass

    I have updated Windows XP Pro Sp3 to Windows 7 pro 64 English on the AMD Phenom II X 4 64 with ATI Radeon HD4650.

    I liked my screensaver on XP who showed me one of my photos of 5,000 in random mode with name wich included date and place.
    Can't do Windows 7!
    I know that the screen saver appears not to be a big problem, but for me it means a lot. I found this question on this forum but no response.
    Please help me configure screen saver Photos that I wish or find and install an old XP before I reinstall XP on my computer!

    Hello!
    I discovered how do in reading
    http://social.answers.Microsoft.com/forums/en-us/w7desktop/thread/45799d0c-38f2-40FC-B42B-4b53ef7c798f/
    Then I found ssmypics.scr in terms of Windows XP and copied on W7/Windows/System32 map!
    It works very well!

  • How to make a Popup window Animation

    Hello
    I spent the last few hours trying to add effects such as the Iris, dissolve, resize a PopUpWindow that opens via PopUpManager in Apollo/AIR. The class that is the base for the pop up is a Panel. I'm trying to get a course of animation when the window opens, something similar to how OSXs min and max works when an application in Dock more icon.
    I searched on all things obvious usuals, but cannot find anything. So I ask, permanent experts, how would approach something like that?

    Thank you

    You know, all the events that I tried to call the effect, I forgot the most obvious, creationComplete. Runs like a champ. My popup windows now appear from nowhere and with style!

Maybe you are looking for