I am trying to programatically define my program layout and add a button to it at a certain position. I am not using the layout xml as the content view.
RelativeLayout mainLayout;
    mainLayout = new RelativeLayout(this);
    mainLayout.setLayoutParams(new
LayoutParams(LayoutParams.FILL_PARENT,android.view.ViewGroup.LayoutParams.FILL_PARENT));
I have then added a button that I want to apply the properties
layout align center
parent align left
height 60px
width 60px
here is the button so far
Button BtnNext = new Button(this);
    BtnNext.setWidth(60);
    BtnNext.setHeight(60);
    BtnNext.setFocusable(true);
    BtnNext.setId(idBtnNext);
    BtnNext.setText("Next");
    mainLayout.addView(BtnNext, 1);
Height and width DON'T work correctly.