I want to build an app whose structure is defined by a yaml file. Therefore it is necessary to generate several activities (B4XPages) dynamically at runtime.
It was not really a problem.
I was just too hasty and didn't look properly.
There is already a perfect option with pm.AddPageAndCreate.
Now i just instantiate a new B4XPage class and add it to the B4XPagesManager