title: Accessing a custom view from the xml layout
body: <p>In an Android application, I have created a custom view extending the <code>View</code> class. I want to declare an object of my class in the xml layout file but, even after many tries, the application unexpectedly stops when the <code>setContentView</code> call is executed (that's what the popup windows which appears says).<br>
  In my view class, which is declared in my <code>MainActivity</code> file as public, I have two constructors : one with only the <code>Context</code> as parameter and one with a <code>Context</code> and an <code>AttributeSet</code> parameters. And I have overridden the <code>onDraw</code> function.<br>
  This class is in my source package, named <code>org.me.myapp</code>.
  In the layout file, I declare the object I want to insert like this :</p>
  
  <pre><code>    &lt;org.me.myApp.MainActivity.myView"
      android:id="@+id/View"
      android:layout_below="@id/toto"
      android:layout_width="300dip"
      android:layout_height="100dip"/&gt;
  </code></pre>
  
  <p>Can anyone tell me what is wrong?</p>
  
  <p>Thanks in advance for the time you will spend trying to help me.</p>