Converting layouts to ConstraintLayout

Finally, as promised, this is how we can convert RelativeLayout to the faster-running ConstraintLayout:

  1. Switch back to the Design tab
  2. Right-click the parent layout – in this case, LinearLayout, and select Convert LinearLayout to ConstraintLayout, as shown in the following screenshot:
    Converting layouts to ConstraintLayout

Now, you can convert any old RelativeLayout layouts to the new faster ConstraintLayout as well as build your own RelativeLayout.

Get Android Programming for Beginners - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.