08-02-2008 10:32 AM
In the new blackberry 4.5 simulators, when creating a new task or calendar appointment, there are areas that are separated in rectangles
how do I create that kind of manager, is it something built in?
Here is an example.
08-03-2008 02:37 PM - edited 08-03-2008 02:39 PM
I'm not sure if there is anything specific in 4.5.0/4.6.0, so there might be a better solution then what I am about to give. I heard mention of a border factory in 4.6.0, but I do not know anything about it. In lower versions you can use:
a) Parent manager with colored/image backgound w/ each section being a child manager with a different background (like white). You would have to override sublayout to shift the child managers around so there is padding to display the color/image of the parent.
b) No parent manager, just section managers. Override paint and draw a border using drawRect or use png cutouts to draw the top/right/bottom/left borders. You would probably want to add padding again so you don't draw other fields/text over/behind the border.
This thread talks about padding:
08-15-2008 04:50 AM - edited 08-15-2008 05:40 AM
OK, Implemented my own custom manager,
But i seem to have a problem.
When i put a EditField in the manager, and the user enteres a long input, The line wraps around, but the rest of the fields arnt pushed down.
How do i do it so that if a fields height changes, the layout will be recalculated and the fields will be reapainted?
I debuged the application, and i see that when an extra line is added, sublayout is called,
but getPreferredHeight on the edit field returns the same as it did when it was one line.
08-15-2008 05:44 AM
Never mind that,
I found the solution!
for anyone wanting to do this in the future, the solution is to use getHight, and not getPreferredHeight