Maybe I'm wrong but... are you asking how to do this in a B4XPages project? I hope it's clear that B4XPages and B4X are not the same thing. By B4X we mean the language that, with some adjustments, can be suitable on various platforms.
With B4XPages projects in B4A the only way to have both orientations is to use the Main Activity in one of the two and one or more other Activities with the opposite orientation.
If, however, you were not referring to B4XPages projects, search the site, as it is a topic that has been written about a lot.