Can i call setContentView() method in getView() method of Android?
<p>Can I call <code>setContentView()</code> method in a <code>getView()</code> method? If so, how?<br>
Actually, I have a List that I am using to show some views like TextView, Imageview, and Button. Now on a button click event I want to show some other View. Here is my code:</p>

<pre><code>Button select = (Button)findViewById(R.id.button1);
select.setOnClickListener(new OnClickListener() {
  public void onClick(View arg0) {
     setContentView(R.layout.search);
  }
});
</code></pre>

<p>But it is giving me a syntax error because I am using this method in a BaseAdapter class.</p>

<p>Is there any other way to do this.?</p>

<p>Thanks in advance.</p>
