title: How do I override methods of a view from Layout?
body: <p>I am wondering how extend a <code>View</code> class that is right inside my layout from my code.
  I have seen different examples where we say for example:</p>
  
  <pre><code>listView = new ListView(this){
     //Override some methods here
   }
  </code></pre>
  
  <p>Now what if i already have the <code>ListView</code> in my layout and i still want to override something. the only way i can reference the <code>ListView</code> from inside my layout is for example:</p>
  
  <pre><code>listView = (ListView)findViewById(R.id.mylistView);
  </code></pre>
  
  <p>So from this example how do I override a method of the list view.
  Please I am just an average android programmer. Please enlighten me.</p>