title: Remove layout programmatically
body: <p>I have got following xml structure of my app activity. Now I would like to remove child RelativeLayout programmatically with id layer1Front. How would I do that in code. I dont want to hide it, I need to remove it because of memory issues in my app. Also after removing it somehow will my app be lighter and faster than current one?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"&gt;
  
      &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:id="@+id/layer1Front" &gt;
      &lt;/RelativeLayout&gt;   
      &lt;HorizontalScrollView android:layout_width="wrap_content"
          android:layout_height="wrap_content"&gt;
          &lt;FrameLayout android:layout_width="wrap_content"
              android:layout_height="fill_parent"                   
              android:id="@+id/parallaxLayers"        
              android:visibility="gone"&gt;      
          &lt;/FrameLayout&gt;
      &lt;/HorizontalScrollView&gt;
      &lt;RelativeLayout android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/frontView"&gt;
  
      &lt;/RelativeLayout&gt;       
  
  &lt;/RelativeLayout&gt;
  </code></pre>