Build a UI with Layout Editor

https://developer.android.com/studio/write/layout-editor.html

[By the way, to get the dark theme of Android Studio as shown above, in Android Studio, click the File menu -> Settings -> Appearance & Behavior -> Appearance -> Theme -> select Darcula instead of IntelliJ theme.]

Convert a layout to ConstraintLayout

ConstraintLayout is a view group available in the Constraint Layout library, which is included with Android Studio 2.2 and higher. It was built from the ground up along with the Layout Editor, so everything is accessible from the design editor and you never need to edit the XML by hand. Best of all, its constraint-based layout system allows you to build most layouts without nested any view groups.

For improved layout performance, you should convert older layouts to ConstraintLayout. Android Studio has a built-in converter to help you do this:

  1. Open your existing layout in Android Studio and click the Design tab at the bottom of the editor window.
  2. In the Component Tree window, right-click the layout and then click Convert layout to ConstraintLayout.

To learn more about how to build a layout with ConstraintLayout, see Build a Responsive UI with ConstraintLayout.

Leave a Reply