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.
In a custom view (and generally), it is easier to create a layout to load other CustomViews, and load that. Seems overkill if you only want one view, but the bonus is that it manages resizing (providing you put anchors in the layout). Resizing may not (yet) be an major issue for Android especially using B4XPages, but it's a good idea as a basic principle.
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.