Application crashing on startup due to click listener?
<p>This code which compiles fine seems to crash my application at startup</p>

<pre><code>private OnClickListener teamlisten = new OnClickListener() {
     public void onClick(View v) {
      getListView().setVisibility(View.GONE);
  }
}; 
 //this is in OnCreate
Button teambtn = (Button)findViewById(R.id.teams);
teambtn.setOnClickListener(teamlisten);
</code></pre>

<p>Any help is appreciated.</p>

<p>Thanks,
Andrew</p>
