问题
I have a layout defined in XML as root ConstraintLayout that contains 4 empty frameLayouts for dynamically inflating fragments. In order to have a better design experience in the layout editor (Android Studio), is there a way to show/mimic the intended layouts in each of these framelayouts?
This question is not about loading a fragment in a container dynamically (in the code), I am looking for a solution that will allow me to load a layout in a container/Framelayout in the Layout Editor!
回答1:
According to my knowledge and answer to this SO question it is not possible. However in the answer to this question you can find a workaround.
来源:https://stackoverflow.com/questions/42882159/layout-editor-how-to-show-layout-in-framelayout-container