title: Android: setImageBitmap vs setImageURI during listview scrolling
body: <p>I have a listview with unknown number of custom items, and during scrolling - inside getView) I check if the related image to aConvertView is exist locally and set it to the listview item (aConvertView):</p>
  
  <pre><code>    // out of getView(...)
  
      Bitmap mBitmap;
      BitmapFactory.Options mOptions = new BitmapFactory.Options();
      mOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
  
  
      // Inside getView(...)
  
      File file = new File(mContext.getFilesDir(), picture_file_name);
      if(file.exists())
      {
          **// Which one has less impact on the UI thread?**
  
          mBitmap = BitmapFactory.decodeFile(file.getPath(), mOptions);
          aImageView.setImageBitmap(mBitmap);
  
          // OR
  
          aImageView.setImageURI(Uri.fromFile(file));
      }
  </code></pre>
  
  <p>Of course I have the known problem of scrolling latency, and I want to know the best approach / method to set the ImageView of the item during scrolling. </p>
  
  <p><strong>Is setImageBitmap has less impact on UI thread than setImageURI?</strong> or both work on the UI and causes the latency.</p>
  
  <p><strong>Is using new File , File.exists() has an impact on the UI thread?</strong></p>
  
  <p>Needless to say that I use a holder for my listview items, and used the following params for my listview:</p>
  
  <pre><code>        android:smoothScrollbar="true"
          android:scrollingCache="false"
          android:animationCache="false"
  </code></pre>