更改AndroidStudio的預設佈局
阿新 • • 發佈:2019-02-20
谷歌釋出新版本的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>