title: About XML layout & custom android class
body: <p>I'm using Eclipse IDE.
  How I should define class, initialized (for example) in <code>activity_main.xml</code> ?
  Lets presume, in <code>activity_main.xml</code> I have definition of ListView object like:</p>
  
  <pre><code> &lt;ListView
      android:id="@+id/ListViewAction"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
  &lt;/ListView&gt;
  </code></pre>
  
  <p>Normally I could handle this in file <code>MainActivity.java</code> and it's fine.</p>
  
  <p>But I want to split code to different <code>.java</code> file and create class extending ListView.
  So, I create new java class file and what I should put in that class to overload ListView ?
  If I place standard class definition in that new java file, it doesn't work:</p>
  
  <pre><code>public class ListViewAction extends ListView {
  
      public ListViewAction(Context context) {
          super(context);
          System.out.println("ListViewAction()");         
      }       
  }
  </code></pre>
  
  <p>How I should correctly define class in new java file and XML?</p>