As part of an Android App I am building a button set. The buttons are part of a nested set of LinearLayouts. Using weight I have the set resizing itself automatically based
LinearLayout YOUR_LinearLayout =(LinearLayout)findViewById(R.id.YOUR_LinearLayout) LinearLayout.LayoutParams param = new LinearLayout.LayoutParams( /*width*/ ViewGroup.LayoutParams.MATCH_PARENT, /*height*/ 100, /*weight*/ 1.0f ); YOUR_LinearLayout.setLayoutParams(param);