error inflating class, custom view
<p>I have seen this error posted before but none of the answers seem to fix my problem so I am not really sure what is going on. It is failing when it tries to inflate my class in the xml.</p>

<p>XML:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#EEE"
    &gt;
    &lt;android.view.SurfaceView
        android:id="@+id/preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        &gt;
    &lt;/android.view.SurfaceView&gt;
    &lt;com.commonsware.android.picture.PictureDemo.DrawOnTop
        android:id="@+id/grid"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        &gt;
    &lt;/com.commonsware.android.picture.PictureDemo.DrawOnTop&gt;
&lt;/FrameLayout&gt;
</code></pre>

<p>Class:</p>

<pre><code>class DrawOnTop extends View 
  { 

      public DrawOnTop(Context context) 
      { 
          super(context); 
      } 

      public DrawOnTop(Context context, AttributeSet attrs) 
      { 
          super(context, attrs); 
      } 

      public DrawOnTop(Context context, AttributeSet attrs, int defStyle) 
      { 
          super(context, attrs, defStyle); 

      } 

      @Override 
      protected void onDraw(Canvas canvas) 
      { 
          Paint paint = new Paint(); 
          paint.setStyle(Paint.Style.STROKE); 
          paint.setColor(Color.BLACK); 
          canvas.drawText("Test Text", 10, 10, paint); 
          canvas.drawBitmap(bitmap, 0, 0, null);
          super.onDraw(canvas); 
      } 
  } 
</code></pre>

<p>Error:</p>

<pre><code>02-11 16:06:25.456: E/AndroidRuntime(11717): Caused by: android.view.InflateException: Binary XML file line #14: Error inflating class com.commonsware.android.picture.PictureDemo.DrawOnTop
</code></pre>

<p>I have all the constructors and dont see any other problem, what am I missing?</p>
