title: Drawing on canvas not working
body: <p>I have the following xml setup:</p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/content"
          android:orientation="vertical"&gt;
      &lt;/LinearLayout&gt;
  
      &lt;ListView
          android:id="@+id/navList"
          android:layout_width="250dp"
          android:layout_height="match_parent"
          android:layout_gravity="left|start"
          android:background="#cccccc"/&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>I now would like to draw a canvas in that linear layout, therefore I do that:</p>
  
  <pre><code>Radar radar = new Radar(this, this.width);
  content.addView(radar);
  </code></pre>
  
  <p>and here is the radar class:</p>
  
  <pre><code>private int width;
  
  public Radar(Context context, int width){
      super(context);
      this.width = width;
  }
  
  @Override
  protected void onDraw(Canvas canvas) {
      super.onDraw(canvas);
  
      Paint circlePaint = new Paint();
      circlePaint.setColor(0xFF00FF00);
      circlePaint.setStyle(Paint.Style.FILL);
  
      Rect rect = new Rect();
      rect.set(0, 0, canvas.getWidth(), canvas.getHeight() / 2);
  
      canvas.drawRect(rect, circlePaint);
  
      //canvas.drawCircle(0, 0, this.width, circlePaint);
  }
  </code></pre>
  
  <p>The problem I encounter is that the canvas doesn't show up</p>
  
  <p>How can I fix that?</p>