Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Relative Layout as default layout

I usually use Relative layout for most of my activity. I want to make Android studio create Relative layout by default when I create new activity, instead of Constraint Layout. Is there a way to do that?

like image 714
Haroon Avatar asked Jul 30 '16 21:07

Haroon


2 Answers

  1. Right click on layout folder -> New -> Edit File Templates...
  2. A dialog opened, go to "Other" tab.
  3. Change the content of "LayoutResourceFile.xml" and "LayoutResourceFile_vertical.xml" Change root tag to the type of layout you want. Hope this help :)

enter image description here

like image 181
Huy Avatar answered Sep 27 '22 21:09

Huy


goto
'...\Android\Android Studio\plugins\android\lib\templates\activities\common\root\res\layout\simple.xml'
and change default layout

like image 35
Kourosh Avatar answered Sep 27 '22 21:09

Kourosh