title: Own defined Layout , onDraw() method not getting called
body: <p>I defined a class like that：</p>
  
  <pre><code>public class TestMyFrameLayout extends FrameLayout{
  
      Paint mPaint;
      public TestMyFrameLayout(Context context, AttributeSet attrs) {
          super(context, attrs);
      }
  
      public TestMyFrameLayout(Context context) {
          super(context);
          mPaint = new Paint();
          mPaint.setColor(Color.GREEN);
      }
  
      protected void onDraw(Canvas canvas) {
          super.onDraw(canvas);
          canvas.drawCircle(50f, 50f, 30, mPaint);
      }   
  }
  </code></pre>
  
  <p>and called it like:</p>
  
  <pre><code>TestMyFrameLayout myFrameLayout = new TestMyFrameLayout(this);
  LayoutParams myFrameLayoutParams = new LayoutParams(300,300);
  myFrameLayout.setLayoutParams(myFrameLayoutParams);
  setContentView(myFrameLayout);
  </code></pre>
  
  <p>But In fact TestMyFrameLayout.onDraw(Canvas canvas) function not getting called, why?</p>