Function of recharging of the screen

Here's what I'm trying to accomplish

1. run screen, but make the configuration checks.

1 test issit 1st time straight thru

persistentObject = PersistentStore.getPersistentObject (KEY);
If (persistentObject.getContents () == null) {/ / run the Welcome screen}

2. If so, run the screen of welcome instead of the screen. The next screen is configuration screen.

3 setupscreen.close, save all the settings.

4. return to 1.

Here's my problem: when setupscreen.close (this.close ()), it goes back to the screen of welcome instead of the screen.

I tried invalidate(), but in vain.

My skaleton is something like this:

It is the basis

package net.test.my;

import net.rim.device.api.ui.UiApplication;

public class ptApplication extends UiApplication {

    public ptApplication() {
        ptMainScreen mainScreen = new ptMainScreen();
        pushScreen(mainScreen);
    }

    public static void main(String[] args) {
        ptApplication app = new ptApplication();
        app.enterEventDispatcher();
    }
}

It is screen

package net.test.my;
// imports stuff

public class ptMainScreen extends MainScreen implements FieldChangeListener {

// var declarations

    public ptMainScreen() {

        persistentObject = PersistentStore.getPersistentObject(KEY);
        if (persistentObject.getContents() == null) {
               //Welcome screen with "Setup" button
               //call to ptSetupScreen via userSettings               } else {
                   //display real mainscreen
        }
}
private void userSettings() {        ptSetupScreen setupScreen = new ptSetupScreen();        UiApplication.getUiApplication().pushScreen(setupScreen);    }

// fieldChanged and stuffs

ptSetupScreen

package net.test.my;

// import stuffs 

public class ptSetupScreen extends MainScreen implements FieldChangeListener {
    public ptSetupScreen() {
              // setup screen
              // save data then this.close
    }
}

I suggest read you the developer's guide and study some of the samples.

pushscreen (mainscreen)

pushscreen (welcomescreen)

in welcomescreen, button, popscreen (welcomescreen) and pushscreen (optionsscreen)

in optionsscreen, popscreen (optionsscreen)

-> visible screen is screen

Tags: BlackBerry Developers

Similar Questions

  • HP laptop, 2000 - 2a20CA: Page of the screen shrinks by using the cursor key

    Laptop HP 2000-2a20CA

    No. B5R61UA

    It seems the upgrade from Win 7 to win 10 Home edition, in navigation or by using a Microsoft Office program, the windows Explorer.

    When you move the cursor with the touchpad and then listen to select a link, function etc. anywhere on the screen/page.

    The screen will decrease in size to the left or right of the screen or reduce to the taskbar.

    Clues, there is problem Win 10 or touchpad.

    HP 2000-2a20CA, running Windows 10 laptop

    Thank you

    I think I solved the problem because now I think.

    To check the HP site looking for updates to Win 10 and none were found.

    But then I changed my version of Windows to win 8 then rechecked updates and there is an update for the touchpad dated March 2016.

    Downloaded and installed, and everything seems OK so far.

    Thanks again.

  • How can I get rid of what looks like a soccer ball on the screen?

    When I move the cursor upwards or downwards, a small icon that looks like a soccer ball that appears on the screen and its function is to scroll the screen at lightning speed. It brings me to tears. How can I get rid of him?

    I'm terribly sorry. This problem was not the work of Windows, but it is rather a problem of Mozilla Firefox. The small circle with a dot in the middle (it looks like a ball of soccer at first glance) is because of the "scroll" of Firefox feature. If you are in a browser window and you move the wheel mouse this little circle appears and before you can blink, you are at the top or bottom of the page. Very annoying.

    In any case, for those who have this problem: in the Firefox browser, click on tools, Options, advanced options, and under navigation, clear "use autoscrolling".

  • My iPhone 6 s Plus the function to rotate the screen how this return

    My iPhone only more 6 used to rotate the screen, it is more the fact how this function returns

    Swipe up from the bottom of the screen to bring up the control center. Then press the icon that looks like a padlock inside a circular arrow. https://support.Apple.com/en-us/HT204547

    -AJ

  • Keys (Fn + F6 and F7) function to set the brightness of the screen does not work

    original title: Fn + F6 and F7 to adjust the brightness of the screen does not

    The function Fn + F6 or F7 has suddenly stopped working. It has been fine until now, but when I press on them now, nothing happens. I use a toshiba laptop with windows xp, can provide more information if necessary

    Thank you

    Hello

    1 have had any changes made to your computer before this problem?

    2. What is the number of the model of the computer?

    3. the other function keys work as should.

    Perform the steps mentioned below and check:

    Step 1:

    Check if the problem persists when the computer is in clean boot state.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: Make sure that you put the computer to Start Normal once you have finished by referring to step 7 in the article.

    Step 2:

    I suggest you perform the steps mentioned below and check if it helps:

    http://forums.Toshiba.com/T5/keyboards-touchpads/fn-key-not-working/TD-p/253131

    (Valid for all models of Toshiba laptops)

    If the problem persists I suggest you to contact Toshiba to get help:

    http://Toshiba.com/Tai/support.jsp

    Let us know if it helps.

  • I rebooted my machine yesterday and now when it comes to the screen with the scroll bar it restarts in loop. Impossible to enter Safe Mode (arrives at crcdisk.sys and while it recharges) or normal startup mode.

    I restarted my machine yesterday and now when it comes to the screen with scrolling bar (think Night Rider), it restarts in loop.  Impossible to enter Safe Mode (arrives at crcdisk.sys and while it recharges) or normal startup mode.  Startup Repair is unable to repair.  She argues that the onus of a BadPatch.

    Startup Repair shows the following:

    Problem event name: StartupRepairV2
    Signature of the problem 01: external Media
    Signature of the problem 02: 6.0.6000.16386.6.0.6001.18000
    03:6 problem signature
    Signature of the 04:262148 problem
    Signature of the problem 05: BadPatch
    Signature of the 06 problem: BadPatch
    Signature of the problem 07:0
    Signature of issue 08: 1
    Signature of the problem 09: SystemRestore
    Signature of the problem 10:0
    OS version: 6.0.6000.2.0.0.256.1
    Locale ID: 1033

    Hello

    I hope you made redundant data backups as I suspect that the drive has failed. If a PC, you must
    remove all power and remove and reinstall all the cables (at both ends where possible), memory and cards. Do
    not tighten, effectively remove and replace them with care.

    Click here for the manufacturer of your hard drive and launch their diagnosis on your drive.

    By manufacturer diagnostic utilities
    http://www.techsupportforum.com/hardware-support/hard-drive-support/302602-hard-drive-diagnostic-utilities.html
    SpeedFan
    http://www.almico.com/sfdownload.php

    HD Tune
    http://www.hdtune.com/

    ----------------------------------------------

    If necessary:

    You can try an In-Place Upgrade (hopefully save programs and data) or a repair installation (if all goes well
    saves the data, and you need to reinstall the programs). Be sure to do a good backup or three.

    You can use another DVD that are not protected but you will need to copy you have the product key.

    On-site upgrade
    http://vistasupport.MVPs.org/repair_a_vista_installation_using_the_upgrade_option_of_the_vista_dvd.htm

    If nothing works, you can make a repair facility that must save the data but you will need to
    Reinstall the programs. This also requires correct Vista disks especially for OEM versions. You will be
    need to know your product Code.

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    How to perform a repair for Vista Installation
    http://www.Vistax64.com/tutorials/88236-repair-install-Vista.html

    No new chances.
    Rob - bicycle - Mark Twain said it is good.

  • Office system Vista, have a delay in all functions. start-up, connection, IE internet, opening files. To get a "waiting for..." appearing at the bottom of the screen - it seems to me that this means?

    Original title: Vista 32 bit system. slow!

    Office system Vista, have a delay in all functions. start-up, connection, IE internet, opening files. I seem to get a "waiting for..." at the bottom of the screen and a green line appearing across the top of the window when I'm waiting - whatever that means? Have upped the ram 4 GB - no change. runing ie7 to present, took 37sec to open the Web site to report this issue? All ideas, we will wait for you

    I was running another program to search for spyware, if you haven't done so already.  In addition, launch your AV software

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-system/remove-malware-or-virus/6bb49107-dfb7-4edc-990a-a0c533b6487d

    Did you ever reinstalled your OS from Vista running on your system?  If you have a Windows Vista OEM preinstalled on your system and you have an external hard drive, it wouldn't hurt to go back to factory settings and transfer your data on.  You would eliminate several possible culprits in your system running slow.

  • Windows will start, the screen starts flashing and then the screen say Logging Off, then restore the screen to the CTRL ALT DEL all other functions will not work.

    Start my computer, it will default to the CTRL ALT DEL screen.  After graduating in the login screen I enter the password.  Windows will start and then the screen starts flashing and the screen say Logging Off, then restore the screen to the CTRL ALT DEL I can boot into safe mode.  All other functions will not work.

    Thank you

    I guess you wanted to ask how to solve the problem. If then all in Safe Mode you can use system restore to set up Windows to a point when the problem did not exist.

  • Unable to get the screen saver in the windows home premium/no local political component software plug-in available function to adjust settings

    Hi all

    Could someone please tell me how to activate my screen saver, I did a fresh install of windows 7 Home premium and the BONE seems to work very well.

    As soon as I select a screen saver and press apply/ok I wait a few minutes and nothing!  , apparently, this function can be modified via local group policy / I can not even find the local policy snap in my MMC not home premium can't?

    Any help with this rather annoying problem would be nice.

    Rgds kagen

    Hi all

    Could someone please tell me how to activate my screen saver, I did a fresh install of windows 7 Home premium and the BONE seems to work very well.

    As soon as I select a screen saver and press apply/ok I wait a few minutes and nothing!  , apparently, this function can be modified via local group policy / I can not even find the local policy snap in my MMC not home premium can't?

    Any help with this rather annoying problem would be nice.

    Rgds kagen

    The original version doesn't have access to all the functions that are available in the Pro or ultimate versions (company?). That said, the screen savers are enabled by default, so if none of them work something may be blocking them. Maybe some program/utility running in the background, or with a parameter to disable screensavers while the application runs.

  • Surface of the screen keyboard and function keys

    Because the on-screen keyboard on the Surface has features such as F11 keys?

    Vance Announces (thank you)!

    JJ

    On my Surface Pro 3, there is a built-in program called "On-screen keyboard" that appears much smaller keyboard with all the functions. Not only the key Fn, but also of PG. PREC, PG. Next, etc.

    It also can be moved on the screen easily to place it where you want.

    Just go to start/find an entry "keyboard", you should find "On-screen keyboard" that you can pin to the start menu and the taskbar.

    It's a little more difficult to type on because the keys are smaller, but it's really more convenient to use.

  • Resize the application window to customize the function of the screen - problem?

    I know this may seem a little geek,

    but I wanted to know why the function of the shortcut is irregular:

    Resize the application window or floating window to fit screen. (Press again to resize the window so that the contents of the screen.)

    CTRL +-(backslash)

    Command +-(backslash)

    1 window Resized to fit screen - activated via the shortcut Ctrl +-

    Screenshot (1).png

    2. the window is not Resized fit screen - function is disabled have it minimized the window

    (The title bar is hidden,

    but the right is a vertical space,

    where the software does not match the screen completely.)

    Screenshot (2).png

    I want to know why this happens,

    at least on Windows is... (Yes, I use Windows 10)

    It would be on purpose?

    Some features to help with something,

    When the user returns to minimize the window?

    I wanted to keep window screen will perfectly still.

    even when minimized and return to the software;

    I need more space on the screen,

    in the vertical direction especially (because I have a screen ultra widescreen 2560 x 1080).

    To see a preview of the video is better,

    because 50 percent of the preview screen,

    However, if the proposed title bar (i.e. without use shortened).

    lose a small percentage.

    I want the amount of space as possible.

    I'm tired of getting retracing the shortcut each time I pass a task.

    Submit a bug report and use the version of application window for now. Maybe someone here could offer a workaround solution, but I think we have said pretty much everything what it means

  • The State of function keys is not displayed on the screen

    Hi... Please help me.  I m havin lenova ideapad s10 - 2 netbook. In the present when I press fn + function keys action is performing, but his status is not displayed on the screen. So, if I want to spend on WLAN when I press fn + F5 screen does not appear. Usb devices are not detect my phone. Please help me...

    Thank you

    Hello and welcome,

    You can try to re - install the driver included in the establishment of lenovo

    cordially KalvinKlein

  • Firefox didn't stop when I close, and it stays running but doesn't charge on the screen when asked. It says Firefox is running and will not let me recharge. I end up close with the Task Manager. Suggestions?

    See the above phrases. Firefox continues to run, but the screen cleared of Firefox and I can't restart from the icons.

    Hello

    Please see this. Please note that the precise way of closing of Firefox's file (Alt + F) > exit and would usually take a few seconds depending on the history of the parameters of compensation to Tools (Alt + T) > Options > Privacy > settings next to clear history of Firefox closing. If there is delay in a plugin, you can also try to complete the process the process plugincontainer and check if Firefox closes on its own.

  • Bug: The screen does not sleep when the phone is plugged in / recharge

    The screen is not automatically timeout if the phone is connected via USB - it doesn't seem to be an option to change this.

    Looks like the screen is activated by default when loading, which means that it takes more time to load.

    Go into the settings of-> Applications-> development-> stay awake (uncheck)

  • regarding the screen lock function

    Hello

    I got my phone by using the "secure with PIN code. [go to control panel-> slot security screen-> screen-> Select "Secured with PIN option" lock].

    Lock the phone by using the power button. Now unlock it using the power button. You could be brought to the screen that displays a numeric keypad that allows you to enter the PIN code to unlock the phone.

    Now, let your phone goes to sleep. (The phone automatically locks once it goes to sleep). Unlock the phone using the power button. Now the screen with the number pad does not appear. You can simply drag and you would be ready to go.

    This I think is a glaring goof-up. The keypad should not come to every time I unlock the phone.

    -Sandrine

    Display hour of sleep and lock are not the same, if you set a security password/PIN, etc... You must set the time interval before the recovery of the display phone lock.

    Go to settings, security, automatically lock and then set the amount of time you want to elapse before the phone locked itself. You can set it to leave immediately for 30 minutes.

Maybe you are looking for