title: SetImageBitmap Not Working in Android
body: <p>I'm developing an app for Android, I'm using the Gallery widget, and I've resized it to fullscreen mode, so it displays one image at a time.</p>
  
  <pre><code>&lt;com.example.librosapp.MyGallery 
          android:id="@+id/examplegallery" android:layout_width="1920px"
          android:layout_height="1020px"
          android:padding="0px"
          android:layout_marginTop="-20px"
          /&gt;
  </code></pre>
  
  <p>And here is a part of my Activity's code:</p>
  
  <pre><code>public View getView(int position, View convertView, ViewGroup parent) {
          ImageView imgView = new ImageView(cont);
  
          //Here are my changes:
          File imgFile = new  File("sdcard/Libreria/0/0/0.JPG");
          if(imgFile.exists()){
              Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
              //The app runs OK til here:
              imgView.setImageBitmap(myBitmap);
              //BOOM! Exception
          }           
  
          imgView.setLayoutParams(new MyGallery.LayoutParams(1950, 1000));
          imgView.setScaleType(ImageView.ScaleType.FIT_XY);
  
  
          return imgView;
      }
  </code></pre>
  
  <p>I don't know which exception am I getting, because I can't debug here, I'm using the .APK in my device. (The only way that I have to debug this, is with the virtual device, and I donnow why it runs really slow.</p>
  
  <p><strong>Am I doing something wrong?, that code works perfect if I use the same image, but as a project Resource (using setImageDrawable)</strong></p>