title: Android: creating two linearlayout in single relative layout with on click button
body: <p>In my single screen android project(using only one XML file) when i press button1 then linerlayout1 is open and when i press button2 then linearlayout2 is open.my button1 and button2 is placed in linearlayout3.can it works??if yes then how??
  thanks in advance. </p>
  
  <pre><code>       &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/relativeLayout1"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent" &gt;
  
         &lt;LinearLayout
         android:id="@+id/linearLayout1"
         android:layout_width="fill_parent"
         android:layout_height="50dp"
         android:layout_above="@+id/linearLayout3"
         android:layout_alignParentLeft="true"
         android:layout_alignParentRight="true"
         android:layout_alignParentTop="true"
         android:orientation="vertical" &gt;
  
        &lt;RadioButton
        android:id="@+id/radioButton3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/linearLayout1" /&gt;
  
       &lt;RadioButton
        android:id="@+id/radioButton4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/linearLayout1" /&gt;
  
  
  
       &lt;/LinearLayout&gt;
  
       &lt;LinearLayout
       android:id="@+id/linearLayout3"
       android:layout_width="fill_parent"
       android:layout_height="50dp"
       android:layout_alignParentBottom="true"
       android:layout_alignParentRight="true" &gt;
  
      &lt;Button
      android:id="@+id/button1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/Button1" /&gt;
  
      &lt;Button
      android:id="@+id/button2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/Button2" /&gt;
  
  
     &lt;/LinearLayout&gt;
  
     &lt;LinearLayout
     android:id="@+id/linearLayout2"
     android:layout_width="fill_parent"
     android:layout_height="50dp"
     android:layout_alignParentBottom="true"
     android:layout_alignParentLeft="true"
     android:orientation="vertical" &gt;
  
      &lt;RadioButton
      android:id="@+id/radioButton13"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/linearLayout2" /&gt;
  
      &lt;RadioButton
      android:id="@+id/radioButton14"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/linearLayout2" /&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;/RelativeLayout&gt;
  </code></pre>