Android layout 如何通过java代码设置linerlayout的高度

Android layout 如何通过java代码设置linerlayout的高度,android-layout,Android Layout,在xml文件中,我使用相对布局作为父级。。 因为我小时候使用Linerlayout。。 如何设置线性布局的高度? 提前感谢请尝试此代码,它将设置线性布局的高度。。它将与 父母在你的情况下是相对的。。希望它能正常工作。。。 LinearLayout LinearLayout=(LinearLayout)findViewById(R.id.linearLayout0); 线性布局。设置最小高度(最小高度)

在xml文件中,我使用相对布局作为父级。。 因为我小时候使用Linerlayout。。 如何设置线性布局的高度?
提前感谢

请尝试此代码,它将设置线性布局的高度。。它将与 父母在你的情况下是相对的。。希望它能正常工作。。。
LinearLayout LinearLayout=(LinearLayout)findViewById(R.id.linearLayout0);
线性布局。设置最小高度(最小高度)