首页 > 移动平台 > 详细

设置Android Studio工程布局文件的默认布局

时间:2018-06-15 20:30:39      阅读:229      评论:0      收藏:0      [点我收藏+]

每次创建新的工程后,布局文件的的布局总是ConstraintLayout,如何更改?

进入Android Studio安装目录,用文本编辑器打开文件plugins\android\lib\templates\activities\common\root\res\layout\simple.xml.ftl

将文件内容修改为

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Hello World" />
</LinearLayout>

保存更改,以后创建的新工程里的默认布局就是LinearLayout

设置Android Studio工程布局文件的默认布局

原文:https://www.cnblogs.com/buyishi/p/9188763.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!