Android Studio2.3更换默认的ConstraintLayout布局

1.在as安装目录\plugins\Android\lib\templates\activities\common\root\res\layout下,找到simple.xml.ftl文件

2.用以下布局替代

<?xml version="1.0" encoding="utf-8"?>  
<RelativeLayout   
    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!"  
    />  
  
  
</RelativeLayout > 

3.重启as

posted @ 2017-06-19 09:57  段合江  阅读(2167)  评论(0编辑  收藏  举报