Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Trusted Contributor
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520
My Carrier: TMN
Accepted Solution

Main screen, screen and app handling of windows

Hi,
I'm newbie on java and on bb development.


I'm finding hard to understand MainScreen, Screen and how should they be used in a application.


Please dont' send links to documentation as I've read a lot from this forum, pdf bb guides, knowledge base artcles etc. and still can't know how must I organize and master the screens of my app.


My app has about 8 diferent windows(or screens): main window, options window, list of items wondows, detail of item window, welcome window(on the first execution) etc...Currently I have to start app.java wich extends UiApplication, that calls either main  or welcome windows who both extend MainScreen.


1-How many MainScreens should one app have? 1?

 

2-Should have one Main screen and all the the others should be Screens?

 

3-Between Options window and Main window i don´t know how should i do it in order to update Main window after

changing settings on Options window

 

4-On the first execution the Welcome window should be called and will have a "continue" button to call Options window and after that it should be called the Main window.

 

Thks in advance!


................................................................................................
Tech On!
PTNews
more at On On On!
Trusted Contributor
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520
My Carrier: TMN

Re: Main screen, screen and app handling of windows

Somebody can at least draw some clues ???

................................................................................................
Tech On!
PTNews
more at On On On!
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Main screen, screen and app handling of windows

As a newbie, I suspect it would be good if you got a book or did some tutorials, as these typically will provide you with a load of useful background information and will fill in a load of blanks.  You can find some tutorials here:

http://supportforums.blackberry.com/t5/BlackBerry-Smartphones-and/ct-p/Smartphones

 

My preferred book is

BlackBerry java Application Development, Beginner's Guide, by Bill Foust. 

 

Anyway some answers:

 

1.  As many as you like, MainScreen does not mean only screen, in this case I think Main is used to indicate that this is the Screen that is mainly used.

2.  No - most of my Applications are actually a combination of MainScreens and PopupScreens.

3  Good question and there is no right answer here.  Let us call the screen that is going to call the Options Screen, your InitialScreen.  So InitialScreen will do a push of a new Instance of the OptionsScreen.  Now it could immediately pop itself off the display stack, so it goes away.  Now when the user exits your Options Screen, your exit processing will the push a new Instance of your InitialScreen.  So the new InitialScreen will pick up the latest values. 

You will find the tutorials and books will give you different options.

4.  How you navigate between windows is entirely up to you.  remember you push to put the Screen (or MainScreen) on the display stack, pop to remove it.  You should always have one screen on the Display Stack or you will display a white screen (or the previous contents).

 

Or and the other thing I would definitely recommend looking at is the samples, they push and pop nicely. 

 

Good luck and have fun!

Highlighted
Trusted Contributor
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520
My Carrier: TMN

Re: Main screen, screen and app handling of windows

Thks a lot for the help peter. I will investigate a bit now and get back to this thread.

................................................................................................
Tech On!
PTNews
more at On On On!