title: Android constraint layout: resize images for all resolutions
body: <p>I have placed small image buttons on the one background image. I have managed the positions of small images using constraint layout. But now, the issue is with the size of small image buttons. As screen size changes images are not changing the size. </p>
  
  <p>I have tried with drawable-hdpi, drawable-xhdpi, drawable-xxhdpi but might be constraint layout is not taking that images. If I apply layout_constraintDimensionRatio, the images change its position for different screens. Or should I use another approach?</p>
  
  <p><a href="https://i.stack.imgur.com/mFGjB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mFGjB.png" alt="enter image description here"></a> </p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context=".MainActivity"&gt;
          &lt;ImageView
              android:id="@+id/imgMainBg"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@drawable/bg"
              android:layout_centerInParent="true"
              android:contentDescription="Background" /&gt;
          &lt;ImageButton
              android:id="@+id/btnImg1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@android:color/transparent"
              android:contentDescription="btnImg1"
              android:scaleType="fitXY"
              android:src="@drawable/btnImg1"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintHorizontal_bias="0.585"
              app:layout_constraintLeft_toLeftOf="parent"
              app:layout_constraintRight_toRightOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              app:layout_constraintVertical_bias="0.183" /&gt;
          &lt;ImageButton
              android:id="@+id/btnImg2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@android:color/transparent"
              android:contentDescription="btnImg2"
              android:scaleType="centerCrop"
              android:src="@drawable/btnImg2"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintHorizontal_bias="0.944"
              app:layout_constraintLeft_toLeftOf="parent"
              app:layout_constraintRight_toRightOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              app:layout_constraintVertical_bias="0.352" /&gt;
      &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>