how to set padding or margin to linear layout?

android, layoutparams

Solution

hope this helps you

LinearLayout.LayoutParams layout_param= new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.fill_parent,
                height * 2);
mLayout = (LinearLayout) findViewById(R.id.layout_menu);
mLayout.setLayoutParams(layout_param);

Problem

I have a linear layout ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_menu" android:layout_width="fill_parent" android:layout_height="70px" android:layout_alignParentBottom="true" android:background="@drawable/footer_bar" android:gravity="center" > </LinearLayout> ``` When i set condition ``` if (constant.getscreenresolution() >= 800) { //i want to make it height * 2 } ``` So how to set the `layout params`?

Original source