更改AndroidStudio的默认布局

谷歌发布新版本的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:orientation="vertical"  
    android:layout_height="match_parent">  
  
    <TextView  
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content"  
        android:text="Hello World!"  
    />  
  
  
</LinearLayout>  

 

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值