title: What is the the mistake here, using the customized view class from xml?
body: <p>i am new in android development and trying to get help. i am trying to use the customized  view class <code>MyView</code> from the main layout.xml file.i have double checked and there is no error showing and also manifest is correct but still not working.it is forcing close. here is my code for xml file</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" &gt;
  
  &lt;com.example.drawingacircle.MyView
      android:id="@+id/mview"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>and the java file </p>
  
  <pre><code>public class MyView extends View {
  
  public MyView(Context context) {
       super(context);
       // TODO Auto-generated constructor stub
  }
  
  @Override
  protected void onDraw(Canvas canvas) {
     // TODO Auto-generated method stub
     super.onDraw(canvas);
     int x = getWidth();
     int y = getHeight();
     int radius;
     radius = 100;
     Paint paint = new Paint();
     paint.setAntiAlias(true);
     paint.setStyle(Paint.Style.STROKE);
     paint.setStrokeWidth(5);
     paint.setColor(Color.WHITE);
     canvas.drawPaint(paint);
     // Use Color.parseColor to define HTML colors
     paint.setColor(Color.parseColor("#e5e5e5"));
     canvas.drawCircle(x / 2, y / 2, radius, paint);
  }}
  </code></pre>
  
  <p>what is the problem here i cannot find out.please help cordially. thank you.</p>