首页 > 代码库 > android RelativeLayout 动态设置高度

android RelativeLayout 动态设置高度

定义:

1     private RelativeLayout mrlay;

调高度:

1   mrlay = (RelativeLayout) findViewById(R.id.rlay_1);2   android.view.ViewGroup.LayoutParams pp =mrlay.getLayoutParams();
3 mrlayt.getLayoutParams();
4 pp.height =180;
5 mrlay.setLayoutParams(pp);

 

android RelativeLayout 动态设置高度