title: Android Studio: Why my screen with images is lagging?
body: <p><strong>Description:</strong></p>
  <p>I have an activity which has 9 &quot;Image Views&quot;. I`ve put images on them loaded from my drawable-v24 folder. The total weight of 9 images together is 992KB (less than 1 megabyte).</p>
  <p><strong>XML code of images:</strong></p>
  <p>All image views (9) are the same:</p>
  <pre><code>&lt;androidx.cardview.widget.CardView
          android:id=&quot;@+id/card_img1&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;100dp&quot;
          android:layout_marginLeft=&quot;20dp&quot;
          android:layout_marginRight=&quot;20dp&quot;
          android:layout_marginTop=&quot;20dp&quot;
          app:cardCornerRadius=&quot;10dp&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/txt_title&quot;
          android:contentDescription=&quot;@string/app_name&quot;&gt;
  
          &lt;RelativeLayout
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;match_parent&quot;
              android:contentDescription=&quot;@string/app_name&quot;&gt;
  
              &lt;ImageView
                  android:id=&quot;@+id/img1&quot;
                  android:layout_width=&quot;match_parent&quot;
                  android:layout_height=&quot;match_parent&quot;
                  android:src=&quot;@drawable/img1&quot;
                  android:scaleType=&quot;fitXY&quot;/&gt;
  
              &lt;View
                  android:id=&quot;@+id/view_background1&quot;
                  android:layout_width=&quot;match_parent&quot;
                  android:layout_height=&quot;match_parent&quot;
                  android:alpha=&quot;0.4&quot;
                  android:background=&quot;@drawable/seleccion_categoria&quot; /&gt;
  
              &lt;TextView
                  android:id=&quot;@+id/txt1&quot;
                  android:layout_width=&quot;match_parent&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:background=&quot;#252525&quot;
                  android:alpha=&quot;0.6&quot;
                  android:fontFamily=&quot;@font/open_sans&quot;
                  android:gravity=&quot;center&quot;
                  android:text=&quot;@string/img1&quot;
                  android:textColor=&quot;#ffffff&quot;
                  android:textSize=&quot;14sp&quot;
                  android:paddingTop=&quot;2dp&quot;
                  android:paddingBottom=&quot;2dp&quot;
                  android:layout_alignParentBottom=&quot;true&quot;
                  android:layout_centerHorizontal=&quot;true&quot; /&gt;
  
          &lt;/RelativeLayout&gt;
  
      &lt;/androidx.cardview.widget.CardView&gt;
  </code></pre>
  <p><strong>What did I try?</strong></p>
  <p>I reduced size of the images to 992kb all but my activity is still lagging. I think it is important to say that my activity runs well in one of my phones (Motorola moto e 5), and very bad in my other phone (Motorola Moto g4).</p>
  <p>Which is the problem? What do I have to do to delete this lag?</p>
  <p>Link to download rar folder with 9 images:
  <a href="https://www.mediafire.com/file/sbp7g6jozqgzv9a/images_tomas_menniti.rar/file" rel="nofollow noreferrer">https://www.mediafire.com/file/sbp7g6jozqgzv9a/images_tomas_menniti.rar/file</a></p>
  <p><strong>Thanks for reading</strong></p>