I want to add two fields in a vertical field manager. I want the first one to be align on the left and the second one (on the second line) on the right.
1
votes
2 Answers
6
votes
You can use the style argument of the field constructor to specify alignment, both horizontal and vertical.
VerticalFieldManager titlevfm = new VerticalFieldManager();
LabelField leftField = new LabelField("my label", Field.FIELD_LEFT);
LabelField rightField = new LabelField("right field", Field.FIELD_RIGHT);
titlevfm.add(leftField);
titlevfm.add(rightField);