Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - How to change layout

In Eclipse, I can right - click on my layout (say LinearLayout) and click on Change Layout In Android Studio, I dont see anything like that. I do see Morphing but that will now show up at all times. For example, if you create simple HalloWorld with RelativeLayout, if you right click on that Layout while in Graphical mode, Morphing will not show. If you right click on a widget in that layout, Morphing shows but to change widget type, not layout type.

like image 657
pixel Avatar asked Mar 11 '15 17:03

pixel


2 Answers

If you want to change the Layout, you can do Two things:

OPTION 1 1. Simply click into your Xml file and select the "Text" option at the bottom on your screen

enter image description here

2.Change to layout

enter image description here

OPTION 2

1.Just drag another layout in Design and put your items in it, delete your old layout PS. you can have layouts in other layouts

enter image description here

enter image description here

Hope I helped!

like image 99
Mazino Avatar answered Sep 24 '22 23:09

Mazino


In Android Studio 3.6.3 the easiest way to change the Layout is to right-click on the layout in your Component Tree and click Convert view….

Component Tree

Convert View

like image 43
Christian Greif Avatar answered Sep 23 '22 23:09

Christian Greif