私は4つのButtonFieldを持っていて、すべてのボタンを水平に揃えたいと思っています。そのために、HorizontalFieldManager を使用し、すべてのボタン フィールドを画面のボタンに配置するために Field.FIELD_BOTTOM を割り当てています。しかし、うまくいきません。何が悪いのかわからない
1636 次
1 に答える
1
マネージャー コンストラクターでUSE_ALL_HEIGHTスタイル を設定してみてください。
class MenuScreen extends MainScreen {
public MenuScreen() {
super(DEFAULT_CLOSE);
HorizontalFieldManager manager =
new HorizontalFieldManager(FIELD_BOTTOM|USE_ALL_HEIGHT);
add(manager);
manager.add(new ButtonField("1", FIELD_BOTTOM));
manager.add(new ButtonField("2", FIELD_BOTTOM));
manager.add(new ButtonField("3", FIELD_BOTTOM));
manager.add(new ButtonField("4", FIELD_BOTTOM));
}
}
代替テキスト http://img412.imageshack.us/img412/8776/manageerg.jpg
于 2010-04-14T18:26:18.183 に答える