How the principal to another screen?

Hi, I have a UiApplication in which I need to implement a few MainScreens. in fact, there is a screen (the one that is in the pushScreen()) start and few managers that behaves like the screen. I crushed onMenu method and add a few items. How can I do, when I click on the appropriate item Manager1 is set to visible and main screen?

Kind regards

1. you can only use one screen and three different feeder and switch between managers according to your menu.

2. or you can use three different screen. In this case, all the three screen must be the same type of menu. Then pop screens and push the

menus. Something like this:

public class MainApplication  extends UiApplication {    public MainApplication()     {        super();               pushScreen(new A());    }        public static void main(String[] args)    {        MainApplication main = new MainApplication();       main.enterEventDispatcher();    }

    public class A extends MainScreen    {        public A()        {           this.add(new LabelField("A"));        }

        private MenuItem menuA = new MenuItem("switchA",100,10)        {            public void run()            {                //do nothing                 //you are already in screen A                                      }              };

        private MenuItem menuB = new MenuItem("switchB",150,10)        {            public void run()            {                popScreen();                UiApplication.getUiApplication().pushScreen(new B());            }              };

        private MenuItem menuC = new MenuItem("switchC",200,10)        {            public void run()            {                popScreen();                UiApplication.getUiApplication().pushScreen(new C());                      }              };

        protected void makeMenu(Menu menu, int instance)        {                    menu.add(menuA);            menu.add(menuB);            menu.add(menuC);                                // default menu            //super.makeMenu(menu, instance);        }    }  

    public class B extends MainScreen    {        public B()        {            this.add(new LabelField("B"));        }        //add menu like A    }

    public class C extends MainScreen    {        public C()        {            this.add(new LabelField("C"));        }        //add menu like A    }    }

Concerning

Bika

Tags: BlackBerry Developers

Similar Questions

  • How to navigate to another screen when I click on BitmapField what listener I have to use?

    Hello

    My requirement is I need to add icons to image in horizontally and when I click on the icon of the image it must navigate to specific screen, so I use BitmapField to display image icons and I added to HorizontalFieldManager but how to navigate to another screen when I click on BitmapField (the image icon) who listens to I have to use?

    Please suggest useful links.  Advanced thanks.

    Concerning

    Sunil.G

    Personally, I prefer to do the treatment that you need directly on the ground rather than using a listener.

    The following code is an example:

    BitmapField bmf = new BitmapField(Bitmap.getPredefinedBitmap(Bitmap.HOURGLASS), Field.FOCUSABLE) {
        protected boolean navigationClick(int status, int time) {
            Screen myScreen = new ();
            UiApplication.getUiApplication().pushScreen(myScreen);
            return true;
        }
    };
    
  • The transition to another screen

    Hello world

    I'm trying to implement the transition from the screen, but nothing happens - newly pushed appears momentally, without any transition at all. No errors in the debugger. What I do is:

    LevelCompleteSplashScreen spl = new LevelCompleteSplashScreen();
            TransitionContext tr = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
            tr.setIntAttribute(TransitionContext.ATTR_DURATION, 1000);
            tr.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_RIGHT);
            tr.setIntAttribute(TransitionContext.ATTR_STYLE, TransitionContext.STYLE_PUSH);
    
            Ui.getUiEngineInstance().setTransition(null, spl, UiEngineInstance.TRIGGER_PUSH, tr);
    

    and after some events in my application, I push just the spl. I checked TransitionContext instance, it is not null, but it does not work. How such a simple transition?

    OK, finally I got things market. I guess that the reason was this part:

    UiApplication.getUiApplication().pushScreen(new LevelCompleteSplashScreen());
    

    I misunderstood and did not explicitly created spl. Now, I just replaced this new instance with spl and transition works. Thank you to all who read and spend your time.

  • How the photos use locking screen account photos

    I have pictures on my lock screen and I want to use for my image of account but I can't move them into windows 8.1

    You need not move them.  Just open the application settings PC, go to the accounts section to take your picture for your account picture:

  • Close an application from a screen pushed to the top of another screen?

    I have 3 screens pushed above the other. Since the top of the screen, I have an option to close the application from there. Should I blow the screens
    under the top of the screen before leaving the application or the system will take care of this for me?

    I have it. Thank you.

  • How to pass parameters/field values from one screen to another screen in blackberry

    Hi all

    I have two screens in my Application UI that is, login screen and continue the screen.

    Login screen has some fields of seizure as a user name and password and default language (French or English) for the application (Group of radio buttons).

    There is a button for the next who directs the user to another screen.

    This second screen has an input field. This input field is mandatory. The user can only go further if it is entered in this field of entry with valid values (i.e. numbers only).

    This screen has continue button so that the user can go further is on the next screen after you have entered a valid value in the field.

    Now, when the user clicks the continue button on the second screen so I have to validate the credentials of the user, he has provided in the first screen. Also, I need set the locale for the language he has provided to the login screen.

    So, to summarize.

    (1) user enters user name, password and language on the first screen. The user clicks NEXT and goes to the second screen.

    (2) on the second screen, the user enters a name click continuous. ((3) user credentials are validated, defined locale and user is illustrated below third screen).

    So, my question is how do I access username, the password, the language of the first screen in the second screen fieldChanged method?

    fieldChanged second display method will be called when user enter a value class we second screen and clicks continue.

    Please advice

    Thanks in advance...

    Store text values in the fields in your application class, and then pass it as a reference to each form or retrieve your instance of UiApplication and cast to the name of your class.

    public class MyApp extends UiApplication {   public String username;   public String password;   public String language;
    
    }...
    
    // Your first screen
    
    public class MyFirstScreen extends MainScreen {   private MyApp _app;
    
       public MyFirstScreen()   {      _app = (MyApp) UiApplication.getUiApplication();
    
          // Set your fields      // AS AN EXAMPLE, you can use:      // _app.username = field1.getText();      // _app.password = field2.getText();      // _app.language = field3.getText();   }}...
    
    // Your second screen somewhere
    
    public class MySecondScreen extends MainScreen {   private MyApp _app;
    
       public MySecondScreen()   {      _app = (MyApp) UiApplication.getUiApplication();
    
          // Access your fields      // you can use:      // _app.username      // _app.password      // _app.language   }}
    

    Now, this is one of the many ways to do it, but it works in its simplest form.

  • Another that holding down the power button, then by restarting, how should I manage my end 2009 27 "iMac when he crashes on the first blank white screen and won't start?

    Another holding down the power button, then by restarting, how should I handle turn on my end 2009 27 "iMac when he crashes on the first blank white screen and won't start?

    Combinations of keys start for Mac - Apple Support

  • I'm trying to connect on Apple TV.  It keeps generating a 6-digit verification code, sent to another device.  I need a 4 digit or need to know how to make a space on the verification code entry screen

    I'm trying to connect on Apple TV.  It keeps generating a 6-digit verification code, sent to another device.  I need a 4 digit or need to know how to make a space on the verification code entry screen

    Read this noting the last two paragraphs:

    For Apple ID - Apple Support two-factor authentication

    You can try to add on your suggested such password or disable the service and then connect.

  • How to manually create another resolution of the screen?

    How can I create another resolution of the screen manually which is not available in Windows 7?

    I recently installed Windows 7 Professional 64-bit with 1 package of Service on my MacBook Pro 17' via bootcamp.

    I want to create a screen resolution 1680 x 1050 because of 17' manually but am not able to do. Hight resolution proposed is only 1600 x 1200 and the results are signs and distorted images.

    How to change the screen resolution correctly? Updates Windows (more than 200) that are not installed so far for it takes very long time will help?

    Do I have to install an additional specific driver?

    I did two things both of samt: I installed all Windows updates and I've updated the PnP Monitor driver. After a new start in Windows 7, the screen resolution was automatically correct (1920 x 1200).

  • How to keep images splash screen specific for the portrait and landscape mode. for example, I have one 360 x 640 image for portarit and another image of 640 x 360 for the landscape

    How to keep specific splash screen for portarit and landscape mode images. for example, I have one 360 x 640 image for portarit and another image of 640 x 360 for the landscape.

    The two are different

    When the user holds the phone in portarit specific Portrait image should appear

    Similarly when the user holds specific landscape landscape image must be indicated without changing the quality of the image.

    IAM answer showing 1 portarit boot image using the

    Hi srk2012,
    You cannot apply 2 different splash screen inames for OS5, 6, 7.

    Check this link https://developer.blackberry.com/html5/documentation/rim_splash_element.html

    Thank you best regards &,.
    Laurent Subudhi

  • I had mt PS CC to another screen and cannot return to the previous upper area is hidden how I get it back?

    I had mt PS CC to another screen and cannot return to the previous upper area is hidden how I get it back? @

    Thank you for the presentation of reports. It is important, that I don't know if what I'm proposing works or not.

    Gene

  • With the new update my screen is not wide enough for the format. How can I change this?

    After the new update, the display shows only 3/4 of what is presented. I reduced the size of the print and that did not help. For example, typing this, once I had as "present" the due screen move to the left to allow me to see what I was typing. It does this automatically. I don't know what caused it in the latest edition of the update, but he made me a certain number of problems by acting on the Bank of line because no moveable windows do not show enough to allow me to hit the submit button.

    I want to see the whole window when I log onto a site. When I open now Yahoo News, for example, I don't see the last of three inches. I can see them if I hover over the page, but until now, I always saw the entire page when it comes to the top without having to take any action on my part.

    Where can I or how can I do to get it to how she still worked before?

    I opened the learning system and it refers to a tool of Mozilla bar which I did not either. Don't know if it of relevant or not.

    Hello

    Firefox on Windows is now after display, scaling options that can make the biggest text on screens at high resolution. There are several ways to solve this problem. See the Web pages are broad and fuzzy after update of Firefox - how to fix article for a suggestion. Here is another possible solution:

    • Type of topic: config in the Firefox address bar and hit the Enter key.
    • If the warning that this might void your warranty , click I'll be careful, I promised.
    • Search for layout.css.devPixelsPerPx

    • Double-click layout.css.devPixelsPerPx to edit its value. The default value is - 1.0 in Firefox 22 and above. Change it to 1.0 to run as in previous versions of Firefox.

    If necessary, further adjust the value of 0.1 or 0.05. Values between 1.0 and around 0.5 to reduce the size of the elements. Use a value greater than 1.0 to increase the size. For example, a value of 1.25 will increase the font size of the 125% to account for the default DPI setting in Windows 8. Check the value that you enter. Definition of a value that is too small will take everything away and too high will explode things.

    If the web pages should always be adjusted so you can watch the extension Default FullZoom Level or NoSquint .

    To adjust the font size for the user interface, you can use the extension of theme font & size changer .

    This solve your problems? Please report to us!

    Thank you.

  • How can I move an application to another screen

    How can I move an application to another screen

    Hold down the icon until they start to move. From there, you can tap the application that you want to move and drag it to the left or right to access the screen you want. Once you are finished, press the home button to complete the task and turn off the wiggle.

  • How can I download a screen shot to the page in question?

    How can I download a screen shot to the page in question?

    You can't attach an image to the first post which creates a thread. You need to add another post (second) to fix an image.

  • How to send values textbox from one screen to another screen

    Hello guys

    can anyone tell me that how can I get the value of the editField from one screen to another screen.

    Please provide the code.

    Thanks in advance

    Click on a single screen Button.of. Pass the value of the textField like this.

    class first extends MainScreen implements FieldChangedListener
    {
        public first()
        {
            ....................
            Declareation of textField and other controls.
        }
        public void fieldChanged(Field f, int context)
        {
            //on the clicking on the Button here the code
            if (f== button)
            {
                String str=textfield.getText();
                UiApplication.getUiApplication().pushScreen(new second(str))
            }
        }
    }
    
    // another screen
    
    class second extends MainScreen
    {
        public second(String str)
        {
            //Now str contain that values.
        }
    }
    

    ------------------------------------------------------------------------------------
    Kudo press to say thank you to the developer.
    Also, press accept it as a button when you got the Solution.

Maybe you are looking for