Haroon
Haroon

Reputation: 59

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?

Upvotes: 5

Views: 8451

Answers (2)

Kourosh
Kourosh

Reputation: 2299

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

Upvotes: 2

Huy
Huy

Reputation: 3363

  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

Upvotes: 12

Related Questions