Layout editor: How to show layout in framelayout container?

巧了我就是萌 提交于 2019-12-10 13:55:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!