i want to add a waiting circle to my listactivity. I used the answer in this post: Using the "animated circle" in an ImageView while loading stuff
However i think i have to add setContentView of the waiting circle layout in order to be able to use findViewById. The problem is i don't know if i can use setContentView twice in the same activity.
Right now when i try it, i get an error that i most use setContentView with the id of the listview layout i want to use.
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.listview);}
    public void showCallList() // show call list on screen
{
    getListView().setVisibility(View.GONE);
    findViewById(R.loadingPanel).setVisibility(View.VISIBLE);
    CallListArrayAdapter adapter = new CallListArrayAdapter(this,
            arrayListCalls);
    setListAdapter(adapter);
    findViewById(R.id.loadingPanel).setVisibility(View.GONE);
    getListView().setVisibility(View.VISIBLE);
}
the exception i get is :
E/AndroidRuntime(4320): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
 
     
     
     
     
    