How to inflate layout?
<p>I have two button and want to change layout content on click button on same page button is on the top. </p>

<p>I want to change particular area content in this xml by clicking on button.  </p>

<p>It works like switch between two page.</p>

<p>Thanks In advance</p>

<p>It shows this exception in logcat</p>

<pre><code>        **11-15 10:06:02.988: ERROR/AndroidRuntime(261): Uncaught handler: thread main            exiting due to uncaught exception
      11-15 10:06:03.017: ERROR/AndroidRuntime(261): java.lang.StackOverflowError
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.graphics.Paint.measureText(Paint.java:1020)
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.graphics.Paint.measureText(Paint.java:1057)
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.text.Styled.foreach(Styled.java:220)
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.text.Styled.measureText(Styled.java:371)
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.text.Layout.measureText(Layout.java:1601)
        11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.text.Layout.getLineMax(Layout.java:655)
       11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.text.Layout.draw(Layout.java:311)
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.text.BoringLayout.draw(BoringLayout.java:356)
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.widget.TextView.onDraw(TextView.java:4032)
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.widget.CompoundButton.onDraw(CompoundButton.java:229)
      11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.View.draw(View.java:6274)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
    11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.View.draw(View.java:6277)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.widget.FrameLayout.draw(FrameLayout.java:352)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
    11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
     11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.View.draw(View.java:6277)
  11-15 10:06:03.017: ERROR/AndroidRuntime(261):     at android.view.ViewGroup.drawChild(ViewGroup.java:1526)**
</code></pre>
