title: adding a subclass of view in the main layout
body: <p>Here is part of main layout file:</p>
  
  <pre><code>&lt;FrameLayout
  
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity = "center" &gt;
      &lt;view
          android:id="@+id/board"
          android:layout_height="match_parent"
          android:layout_width="match_parent"
          class="com.drawshapes.DrawCircles"&gt;&lt;/view&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>It gives me a compile error. I am not sure if I am approaching it correctly. Should I be looking at fragments? or possibly adding another activity file? Or a layout file?
  There is also a snippet from google that starts with something like this:</p>
  
  <pre><code>     &lt;com.drawshapes.DrawCircles&gt;
        android. .....
       &lt;/&gt;
  </code></pre>
  
  <p>But I have no idea where to put them, if they should go into a resource file or create another layout file.</p>
  
  <p>Thank you for your help.</p>