自Android Studio2.3起创建新工程中的Activity,默认的layout根布局是ConstraintLayout。很多人其它不希望首页是ConstraintLayout,每次都要手动修改,如果希望更改新建工程默认的ConstraintLayout怎么办呢?很简单,步骤如下:
1.打开Andorid Studio的安装目录,比如我的是D:\AndroidStudio
2.进入路径D:\AndroidStudio\plugins\android\lib\templates\activities\common\root\res\layout
3.打开simple.xml.ftl文件
这是默认的xml内容
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="matc