开发者

aligning HorizontalFieldManager to the bottom of the Screen

开发者 https://www.devze.com 2022-12-26 14:45 出处:网络
i am having 4 ButtonField and i want to align all the buttons horizontally. for that 开发者_如何学Goi am using HorizontalFieldManager and assigning Field.FIELD_BOTTOM for putting all the button field

i am having 4 ButtonField and i want to align all the buttons horizontally. for that 开发者_如何学Goi 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


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 http://img412.imageshack.us/img412/8776/managerg.jpg

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号