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

Posts: 436
Registered: ‎06-22-2010
My Device: na
My Carrier: blackberry developer

align vertical and horizontal center

In android there is a concept called Gravity,where if i want a field to be vcenter n hcenter at the same time i will give 

setGravity(Gravity.CENTER).But in blackberry if i have to achive this,i need to add the field to hfm and give field_vcenter to it,than add the hfm to vfm and give field_hcenter to hfm.So is there any similar way like in android of doing it in blackberry

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: align vertical and horizontal center

You can do this in the way you have suggested, but the easiest approach is probalby to create your own centering manager.  But the concept as you have described does not exist in BlackBerry Java.