I am facing problem to customize Linear Layout. My xml is as follows:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
>
<LinearLayout android:id="@+id/LinearLayout_LeftPanel"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="#0000ff"
>
<TextView android:id="@+id/LeftPanel_Title"
android:text="Frequently asked questions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
/>
</LinearLayout>
<LinearLayout android:id="@+id/LinearLayout_MainContent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_toRightOf="@+id/LinearLayout_LeftPanel"
>
<TextView android:id="@+id/MainContent_Title"
android:text="Alabama Rules of Civil Procedure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ff0000"
android:textSize="19px"
android:textStyle="bold"
/>
</LinearLayout>
</RelativeLayout>
I want to set the width of @+id/LinearLayout_LeftPanel layout one third of the screen width pro-grammatically on the onCreate(). so how can do this ?