Drop the idea, because it makes no sense, and I donβt see that it can be done anyway.
For example, if you have a layout with two panels and you want to call the Contacts application in the right fragment, which itself uses a layout with two panels, and also using the application panel, how do you expect it to look? This is a contact application that makes a call to setContentView and decides how the layout itself, and not your application. If I am mistaken in what you mean, and this is your activity, then, of course, you can create a fragment from it and load it into the desired representation.
source share