Change ExpandableList view programmaticly
<p>I have an ExpandaleList, and BaseExpandableListAdapter which I implements.</p>

<p>Now sometimes I need to show other xml content, So i am trying to do:</p>

<p>ExpandableList.this.setContentView(R.layout.errorscreen);</p>

<p>but then I get this exception:
  ERROR/AndroidRuntime(23948): java.lang.RuntimeException, Your content must have a ExpandableListView whose id attribute is 'android.R.id.list'.</p>

<p>Now, I have been told to do this in order to fix it:</p>

<pre><code>add  ExpandableListView to your xml layout and set it's id to list. Like so:   
  &lt;ExpandableListView android:id="@id/android:list" android:layout_width="fill_parent"android:layout_height="fill_parent"/&gt;
</code></pre>

<p>But I have no idea how to do it programmaticly, anyone could show me any example?</p>

<p>thanks,</p>

<p>ray.</p>
