if you set an identifier for your layout in this way
<LinearLayout android:id="@+id/linear" />
then you can get the layout in the code this way.
Linearlayout linear = (LinearLayout)findViewbyId(R.id.linear"); linear.setLayoutParams(new LayoutParams(arg0, arg1));
here in arg0 and arg1 you can pass the value of int, you can set the value below
LayoutParams.FILL_PARENT LayoutParams.WRAP_CONTENT
Pratik Sep 19 '11 at 11:44 2011-09-19 11:44
source share