Android: Programmatically defined view in main.xml file?
===

I'm still relatively new to android programming, so please explain things that may seem obvious.

I have defined a custom view programmatically:

    class RenderView extends View{

I would like this view to play nice with some TextViews etc, so I want to include my RenderView in the main.xml file. How do I get the main.xml file to recognize my custom view?

Moreover, if my RenderView has parameters with it's constructor, how would that work? I assume I can't pass parameters directly from the main.xml file, but then how do I get the main.xml file to recognize a view that I have created programmatically?

Thanks in advance, any help is much appreciated!