Converting layouts to ConstraintLayout
Finally, as promised, this is how we can convert the layout to the faster-running ConstraintLayout
:
- Switch back to the Design tab
- Right-click on 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 newer and faster ConstraintLayout
widget, as well as build your own RelativeLayout
.