mac版本Android Studio2.3 修改默认ConstraintLayout为LinearLayout

来源:互联网 发布:知乎 自己拍婚纱照 编辑:程序博客网 时间:2024/05/19 00:52

谷歌现在大肆推行ConstraintLayout,但是作为小菜鸟的我,还是不习惯用,那么问题来了怎么将默认的ConstraintLayout改成LinearLayout就成了问题,AS又不能设置,自己百度了基本上都是windows,可是我坑爹的用的是mac系统,稍微研究了一会就解决了,很简单,另外附上windows的更换教程

http://m.blog.csdn.net/article/details?id=62457897 谢谢KennyChan291

Mac基本上差不多,应用程序--Android studio--显示包内容--Contents\plugins\android\lib\templates\activities\common\root\res\layout,如图所示


用文本编辑器打开simple.xml.ftl文件,

这个就是ConstraintLayout布局文件,直接全部改成如下的

<?xml version="1.0" encoding="utf-8"?><LinearLayout    xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"    android:layout_width="match_parent"    android:layout_height="match_parent">    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="Hello World!"    /></LinearLayout>

然后你保存,新建一个布局,发现已经是你最爱的LinearLayout布局了

修改其他布局也是这样的

注意:最好更改前备份下,好下次恢复


0 0
原创粉丝点击