Android Studio - 如何更改布局 [英] Android Studio - How to change layout

查看:171
本文介绍了Android Studio - 如何更改布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Eclipse 中,我可以右键单击我的布局(比如 LinearLayout),然后单击更改布局"在 Android Studio 中,我没有看到类似的东西.我确实看到了变形,但现在会一直显示.例如,如果您使用相对布局创建简单的 HalloWorld,如果您在图形模式下右键单击该布局,则不会显示变形.如果您右键单击该布局中的小部件,Morphing 将显示但更改小部件类型,而不是布局类型.

In Eclipse, I can right - click on my layout (say LinearLayout) and click on Change Layout In Android Studio, I dont see anything like that. I do see Morphing but that will now show up at all times. For example, if you create simple HalloWorld with RelativeLayout, if you right click on that Layout while in Graphical mode, Morphing will not show. If you right click on a widget in that layout, Morphing shows but to change widget type, not layout type.

推荐答案

如果你想改变 Layout,你可以做两件事:

If you want to change the Layout, you can do Two things:

选项 11. 只需点击您的 Xml 文件并选择屏幕底部的文本"选项

OPTION 1 1. Simply click into your Xml file and select the "Text" option at the bottom on your screen

2.更改布局

选项 2

1.只需在Design中拖出另一个布局并将您的项目放入其中,删除您的旧布局PS.您可以在其他布局中拥有布局

1.Just drag another layout in Design and put your items in it, delete your old layout PS. you can have layouts in other layouts

希望我有所帮助!

这篇关于Android Studio - 如何更改布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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