10-30-2011 12:18 PM
Good day, any body have a example of login like app world interface? is a good interface.
thanks
10-30-2011 01:16 PM
10-30-2011 01:50 PM
10-30-2011 08:05 PM - last edited on 10-31-2011 05:36 AM
This will help you in general when it comes to coding some more complicated UI.
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
10-30-2011 10:21 PM
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.
10-30-2011 10:22 PM
Peter, thank`s. I try it. Your description was excellent.