DEV Community

mike dg
mike dg

Posted on

Android studio Layout Tip 1

I was recently asked "When coding layouts for android apps, do you use pure XML or the editor (drag and drop)"

I do both.

A mixture of both results in the highest producivity for me.

I'll often, somewhat haphazardly, drag and drop to get the basics comoponents in the relatively correct spots in the editor. Then, visually wire up the basic constraints, and then in code fine tune the remaining constraints to actually get everything lined up at run time.

One tip for making drag-and-drop go quicker, is to use the filtering capability of Android Studio and the rest of JetBrains IDEs.
Alt Text
If you type in the View palette, you'll see that it filters to what ever you type.
Alt Text

Top comments (0)