Can I call setContentView() method in a getView() method? If so, how?
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:
Button select = (Button)findViewById(R.id.button1);
select.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
setContentView(R.layout.search);
}
});
But it is giving me a syntax error because I am using this method in a BaseAdapter class.
Is there any other way to do this.?
Thanks in advance.
in
getView(...)and createrowlayout and put imageview,textview,Buttonand see this http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/