Can I change the default layout in Android Studio?

When I create a new project with Blank Activity in Android Studio, it uses RelativeLayout by default. I would like to change that Blank Activity's default LinearLayout, rather than editing each action - is this possible?

+2
source share
1 answer

I already answered this question here: How to change default template files in Android Studio .

Basically, you need to look at the file recipe_fragment.xml.ftlso that you know which files are used for the template.

The default template files are located in the folder

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

, BlankActivity, , ../common/recipe_simple.xml.ftl ( ) , , BlankActivity

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

RelativeLayout LinearLayout ( ), , , , .

+1

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


All Articles