更改Android studio默认布局为LinearLayout

找到安装AS路径
Android Studio\plugins\android\lib\templates\activities\common\root\res\layout
打开文件更改以下内容

<?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> 

猜你喜欢

转载自blog.csdn.net/qq_44091527/article/details/86541846