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
Regular Contributor
IpiRon
Posts: 75
Registered: ‎10-19-2011
My Device: Developer

Understanding GUI Basics

Newbie here. Okay, I know there is a ton of stuff out there on this and I've spent a lot of time with using search and this is not a rant but...

 

I'm trying to get at the fundementals of how the GUI works. I've built some custom edittext and button fields based on the various posts I've discovered (kudos to all for providing them!). But whenever I make a change to implement a new feature something blows up. This to me reflects my lack of understanding of how the various objects, properties and methods are related, i.e. graphics object, layout methods, etc. It seems to me that the various method overrides and low-level coding is the only way to implement these things i.e. a lot of behavior that we need has not yet been implemented as simple properties/methods on the existing UI objects. Okay, we can live with that but we need to know more about how it all ties together (without us having to 'throw stuff against the wall and see what sticks).

 

I know others have expressed a desire for a top down approach (http://supportforums.blackberry.com/t5/Java-Development/A-Question-oF-GUI-Proportions/m-p/554461/hig...) more eloquently than I have but the replies never really seem to point to definitive 'this is how it works' sources. I am familiar with the UI chapters in Rizk's book: Beginning Blackberry development. I am also familiar with the Advanced UI samples (I need to target 5.0 devices though).

 

This current approach is faulty because:

 

1. A lot of information uncovered by searches is either stale, incomplete or wrong. To be expected though, but more importantly it wastes substantial amounts of time.

2. Since RIM designed all this, is there a definitive RIM document, white paper, video, tutorial on this? Seems like at this point in BB it would have been beneficial for them to provide a 'care and feeding' document so us app designers can be more productive. (Yes, I like Javadoc as much as the next developer but it is not the be/end all).

3. A lot of the gurus seem to have to answer the same questions about custom controls. Yes, including mine!

 

So as of today, what is the best way for us newbies coming on board to BB to get up to speed on understanding GUI basics? What we are really looking to do is 'learn how to fish' so we don't have to keep coming to the gurus asking them 'today I would like a trout sauteed in olive oil with lemon, fix me one'!

 

Thanks in advance!!!

 

 

Please use plain text.
Developer
simon_hain
Posts: 16,215
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Understanding GUI Basics

good post, and you are correct with your insights, at least as long as i am concerned.

As a veteran developer we have built a lot of custom ui controls in a library that just grew over the years, but that's not a good idea for a new developer i fathom.

the advanced fields are a very good starting point.
otherwise i think two things are the most important:

understand how the layout works, as the built-in layouts are quite limited.
note that you can do smaller things easily using setPadding or setMargin on fields, but it gets messy very quickly if you want a more complex layout.
http://supportforums.blackberry.com/t5/Java-Development/How-to-Extend-Manager/ta-p/446749
is a good starting point.
builduing a good ui is all about placing the fields.

the second point may be surprising for some: listfield.
in my opinion it is the most powerful ui component, and we use it in every and all applications i think.
old, but still correct examples:
http://supportforums.blackberry.com/t5/Java-Development/Create-a-colour-ListField/ta-p/442955
http://supportforums.blackberry.com/t5/Java-Development/Create-a-ListField-with-check-boxes/ta-p/443...

i close with a really good kb article from our resident ui guru arkadyz:
http://supportforums.blackberry.com/t5/Java-Development/MainScreen-explained/ta-p/606644
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
IpiRon
Posts: 75
Registered: ‎10-19-2011
My Device: Developer

Re: Understanding GUI Basics

Simon,

 

I quickly viewed the 'Extend Manager' video and I'll review in in greater detail this week. I have also seen guru  arkady's post earlier on (as well as many of his others) in my searching. It's funny you mentioned ListFields because I spent last week getting my simple listfields operational. I have more complicated ones coming up. I was playing with the Status Box last week as well but it did not quite fit my needs (I need the Main Screen background to show through and based on my tests I don't think the Status Bar is considered a field on top of the screen). I tried setting the alpha transparency based on some posts but it ended up white. But I digress.

 

One thing we are highly open to is formal 3rd party training so if anybody knows of reputable professional resources located in the U.S. I'd love to hear about them. (Not interested in on-line curriculums though, want face/face lab environments).

 

Thanks again for all your postings!

Please use plain text.
Developer
simon_hain
Posts: 16,215
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Understanding GUI Basics

the main screen kb article explains status and title area. to put it simple, a mainscreen has 3 submanagers, title, main and status.
you can replicate the behavior with own managers to get your transparency effect.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
IpiRon
Posts: 75
Registered: ‎10-19-2011
My Device: Developer

Re: Understanding GUI Basics

Thanks, will give it a try!
Please use plain text.