views:

164

answers:

1

hi all

i am having 4 ButtonField and i want to align all the buttons horizontally. for that i am using HorizontalFieldManager and assigning Field.FIELD_BOTTOM for putting all the button field to the button of the screen. but its not working fine. i don't no what is wrong with it

A: 

Try to set USE_ALL_HEIGHT style in manager constructor:

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));
    }
}

alt text

Max Gontar