ConstraintLayout
ConstraintLayout allows you to create large and complex layouts with a flat view hierarchy (no nested view groups). It's similar to RelativeLayout in that all views are laid out according to relationships between sibling views and the parent layout, but it's more flexible than RelativeLayout and easier to use with Android Studio's Layout Editor. It's more efficient for nested layouts.
Setup
To Import the constraintLayout library add the following depency
build.gradle
dependencies {
compile 'com.android.support.constraint:constraint-layout:1.0.2'
}
Creating The Layout
the xml tag used
<?xml version="1.0" encoding="uft-8"?>
<android.support.constraint.ConstrainLayout
...
>
</android.support.constraint.ConstrainLayout>