The question isn't entirely clear to me, but I'll try to answer anyway.
Creating Views exclusively in Layouts (i.e., using the Designer) is a great practice. Then, in the B4XPage source code, you simply need to declare the variables (and the Designer itself can do this for you), load the Layout (mostly in Root), and that's it.
If, however, you want to create some Views in the project from code, you should know that you can do this with "native" Views, such as Button, Label, EditText, etc., but you can't do it with Custom Views; you'll always have to insert them into a Layout.
Finally, if your question was only about "Activity.AddView", simply write "Root.AddView".