Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Contributor
jamecaes
Posts: 3
Registered: 10-30-2011
My Carrier: comcel

login like app world

Good day, any body have a example of login like app world interface? is a good interface.

 

thanks

Please use plain text.
Guru I
Xandrex
Posts: 15,215
Registered: 07-29-2008
My Carrier: Vodafone France (SFR)

Re: login like app world

hello,
do I understand correctly?

You want to know how to code a credential screen like the one on the AppWorld.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Please use plain text.
New Contributor
jamecaes
Posts: 3
Registered: 10-30-2011
My Carrier: comcel

Re: login like app world

Thanks xandrex,
Yes, my app have a login interface very simple and is no good visually. I want a interface lake AppWorld, but i don't know how do it.
Thanks
Please use plain text.
Developer
peter_strange
Posts: 14,614
Registered: 07-14-2008

Re: login like app world

[ Edited ]

This will help you in general when it comes to coding some more complicated UI.

http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-manage...

 

Regarding the Actual App World Log in, this will not get you something that is exactly like it, but will get you on the way.  The easiest way to do some of this would be to have a custom manager, but let us work with the standard managers for starters to get something that is similar. 

 

I think the screen is a MainScreen. 

 

To replicate the title area, I think you can use the Banner (setBanner(..), with a LabelField.  The LabelField should be defined with 'USE_ALL_WIDTH, and its paint is overridden so it sets it color to white, and then calls super.paint() to paint the text.  In addition, it figures out how wide it is and high high it is, and centers a little icon on the right hand side (in paint()). 

 

The MainScreen has  a Background that you could set to a blue color.

 

Into that area add a HorizontalFieldManager, to which has been added a BitmapField contain an Icon, and then  LabelField with a Bold and larger than normal font.  You might have to override paint again to get the white text.

 

Underneath is a focusable LabelField, this time the font is underlined (again you might have to overwrite paint to get white text).

 

Same for "learn more".

 

The remaining areas go inside a VerticalFieldManager.  This has a Background set with a solid color and margins to bring it in from the edge.  Look at doing a Border to get the curved edges at some later time.

 

Inside this a non focusable LabelField, then a BasicEditField with a Border.

 

Then a HorizontalFieldManager, into which has been added a LabelField and a focusable LabelField.  The focusable LabelField has USE_ALL_WIDTH and DrawStyle.RIGHT to get painted on the RHS.

 

Then a PasswordEditField with a Border.

 

FInally a HorizontalFieldManager, specified with Field.FIELD_HCENTER.  Into this, add the two buttons.

 

And that should get you something like the AppWorld login, at least the one I see on my device...

 

I'm sure this is not everything and that I have not explained things very clearly, but give it a go and come back to us with questions. 

 

Good luck

Please use plain text.
Developer
arkadyz
Posts: 2,146
Registered: 07-08-2009
My Carrier: various

Re: login like app world


peter_strange wrote: 

The MainScreen has  a Background that you could set to a blue color.

 


An absolutely marvelous post, as usual. One warning to the OP, though: I'm not sure about OS 7.0, but there is a long-standing bug in MainScreen which prevents any setBackground and paintBackground override from doing its work. If you only need to support OS 4.6 and greater, the solution is a simple one: getMainManager() on your MainScreen, then setBackground on that Manager. If you need to support earlier OS versions, ask here again - I don't want to burden you now with too many details which you are unlikely to need.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.
New Contributor
jamecaes
Posts: 3
Registered: 10-30-2011
My Carrier: comcel

Re: login like app world

Peter, thank`s. I try it. Your description was excellent.

Please use plain text.