问题描述
我拥有最新的android Studio(2.3 beta 3),并且在创建项目时似乎ConstraintLayout是默认的.如何使Android Studio使用RelativeLayout作为新项目的默认布局元素?
I have the latest android Studio (2.3 beta 3) and it seems ConstraintLayout is the default when creating a project. How can I make Android Studio use the RelativeLayout as the default layout element for new projects ?
推荐答案
好吧,我看到了上面的答案,它也对我有用.但是,我试了一下,然后成功地将当前项目转换为相对布局.请执行以下操作:
Well, I saw the answer above and it worked for me too. But, I gave it a shot, and succeded converting my current project to Relative Layout. Do as follows:
在activity_main.xml选项卡上,将其更改为文本.在它的顶部,您将找到以下内容:
At activity_main.xml tab, change it to text. At the top of it, you'll find the following:
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
只需将xmlns之前的所有内容更改为RelativeLayout.这样做也会改变您会发现的最底线:
Just change all before xmlns to RelativeLayout. Doing so will also change the very bottom line where you would find:
</android.support.constraint.ConstraintLayout>
到
</RelativeLayout>
问题解决了!开心点:P
Problem solved! Be happy :P
这篇关于如何在Android Studio中从默认的ConstraintLayout切换到RelativeLayout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!