title: Grow heap (frag case). Maximize performance
body: <p>I have a problem with my app.
  My activity consists of the following xml code:</p>
  
  <pre><code>&lt;ScrollView
      android:id="@+id/main_scroll"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;LinearLayout
          android:id="@+id/layout_container"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:paddingLeft="16sp"
          android:paddingRight="16sp"
          android:paddingTop="16sp" &gt;
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>Using inflate, insert the LinearLayout containing images .png!
  This causes Grow heap (frag case).
  There is a method to reduce grow the heap, maintaining this setup?</p>
  
  <p>This is the Layout inserted in MainActivity:</p>
  
  <pre><code>&lt;LinearLayout
      android:id="@+id/layout_scheda_serie"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="center"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:id="@+id/text_scheda_nome"
          style="?android:textAppearanceLarge"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textStyle="italic" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="?android:selectableItemBackground"
      android:orientation="horizontal" &gt;
  
      &lt;LinearLayout
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:gravity="center"
          android:orientation="vertical" &gt;
  
          &lt;TextView
              android:id="@+id/text_scheda_simbolo"
              style="?android:textAppearanceLarge"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textSize="25sp"
              android:textStyle="italic" /&gt;
  
          &lt;TextView
              android:id="@+id/text_scheda_numero"
              style="?android:textAppearanceLarge"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textSize="25sp"
              android:textStyle="italic" /&gt;
  
          &lt;TextView
              android:id="@+id/text_scheda_massa"
              style="?android:textAppearanceSmall"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textColor="@android:color/secondary_text_light_nodisable" /&gt;
  
          &lt;TextView
              android:id="@+id/text_scheda_ossidazione"
              style="?android:textAppearanceSmall"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textColor="@android:color/secondary_text_light_nodisable" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:gravity="right"
          android:orientation="vertical"
          android:padding="5sp" &gt;
  
          &lt;com.chElem.RecyclingImageView
              android:id="@+id/imageView_scheda_foto"
              android:layout_width="165sp"
              android:layout_height="165sp"
              android:src="?android:selectableItemBackground" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Thanks!</p>