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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM