布局编辑器:如何在framelayout容器中显示布局? [英] Layout editor: How to show layout in framelayout container?

本文介绍了布局编辑器:如何在framelayout容器中显示布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用XML定义的布局,作为根ConstraintLayout,其中包含4个空的frameLayouts,用于动态填充片段.为了在布局编辑器(Android Studio)中获得更好的设计体验,是否有一种方法可以显示/模拟每个框架布局中的预期布局?

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?

这个问题不是关于动态地(在代码中)在容器中加载片段,我正在寻找一种解决方案,该解决方案将允许我在布局编辑器中将布局加载到容器/Framelayout中!

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!

推荐答案

根据我的知识和对这样的问题是不可能的.但是,在此问题的答案中您可以找到解决方法.

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.

这篇关于布局编辑器:如何在framelayout容器中显示布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆