Within ConstraintLayout
, you can place your ImageView
into a chain with
app:layout_constraintHorizontal_chainStyle="spread_inside"
or
app:layout_constraintHorizontal_chainStyle="spread"
and make the width of each view 0dp
to expand each view horizontally to match its constraints. That will distribute each view across the width of the screen whether in portrait or landscape mode. (See this discussion of chains.)
Once that is done, specify android:adjustViewBounds="true"
for each ImageView
that will make the vector image scale up to fill its view. (See here and here).
Below are two sample images and the XML used. (I used four images, but it will work for six as well.)


<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
app:srcCompat="@drawable/ic_android_green_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView2"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:adjustViewBounds="true"
app:srcCompat="@drawable/ic_android_green_24dp"
app:layout_constraintEnd_toStartOf="@+id/imageView3"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="@+id/imageView" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
app:srcCompat="@drawable/ic_android_green_24dp"
app:layout_constraintEnd_toStartOf="@+id/imageView4"
app:layout_constraintStart_toEndOf="@+id/imageView2"
app:layout_constraintTop_toTopOf="@+id/imageView" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:adjustViewBounds="true"
app:srcCompat="@drawable/ic_android_green_24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView3"
app:layout_constraintTop_toTopOf="@+id/imageView" />
</android.support.constraint.ConstraintLayout>