您的位置:首页 > 移动开发 > Android开发

更改Android Studio的默认布局

2017-10-28 13:29 375 查看
谷歌发布新版本的androidStudio之后  一直力推ConstraintLayout 布局

但是对于不喜欢用的人来说就有点麻烦了  每次都要手动更改  嘻嘻  这个其实是可以修改的

首先打开androidStudio的安装目录 ,我的是E:\Application\androidStudio

进入之后,进入到以下文件夹\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"
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>


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: