How to add my custom view to XML layout?

I wrote the following view:\[code\]public class EllipseView extends View {private final Paint paint = new Paint();public EllipseView(Context context) { super(context); paint.setColor(Color.RED);}@Overrideprotected void onDraw(Canvas canvas) { canvas.drawOval(new RectF(0, 0, getWidth(), getHeight()), paint);}}\[/code\]How to add it to layout in XML? The following does not work (debugger does not connect):\[code\]<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"><View class="com.incubation.EllipseView" android:layout_width="100dp" android:layout_height="100dp" android:layout_marginLeft="200dp" android:layout_marginTop="200dp" /></RelativeLayout>\[/code\]ADDONThere were also a problem with communicating with Eclipse and Device, which required restart to fix
 
Top