How to change default template template files in Android Studio

As you know, every time you create a new project with some activity, Android Studio generates a default activity_main.xml file with RelativeLayout as the root element and one TextView. But I prefer to use LinearLayout without any nested views. How can I change the way the default android object activity_main.xml is created?

0
source share
2 answers

This can be done by editing the default template files, which are located in:

...\Android\Android Studio\plugins\android\lib\templates\activities

, , EmptyActivity ( : , res) :

...\Android\Android Studio\plugins\android\lib\templates\activities\common\root\res\layout\simple.xml.ftl

RelativeLayout LinearLayout , , , , , .

: BlankActivity . : BlankActivity , .

+3

. , , Android Studio 3 3.1. , , .

, Android Studio ( ) .

0

Source: https://habr.com/ru/post/1649659/


All Articles