Converting layouts to ConstraintLayout
Finally, as promised, this is how we can convert RelativeLayout
to the faster-running ConstraintLayout
:
- Switch back to the Design tab
- Right-click the parent layout – in this case,
LinearLayout
, and select Convert LinearLayout to ConstraintLayout, as shown in the following screenshot:
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.