Layout right-to-left in HorizontalFieldManager on BlackBerrry
How do I align elements right-开发者_开发问答to-left in a BlackBerry HorizontalFieldManager?
On JDE 6.0, if you want to do this for locale reasons, then setting the HorizontalFieldManager.LOCALE_AWARE_LAYOUT style bit will cause left-to-right or right-to-left, depending on the user's locale.
The HorizontalFieldManager docs for BlackBerry JDE 6.0 mention a style bit Field.LEFT_TO_RIGHT and Field.RIGHT_TO_LEFT, but I don't see those constants in Eclipse, so that may be a documentation bug.
HorizontalFieldManager adds fields from left-to-right by default. In the following example, the three labels are aligned in one row from left to right.
HorizonatalFieldManager hManager=new HorizonatalFieldManager();
LabelField l1=new LabelField("Label1");
LabelField l2=new LabelField("Label2");
LabelField l3=new LabelField("Label3");
hManager.add(l1);
hManager.add(l2);
hManager.add(l3);
精彩评论