title: Put a big image in an ImageView not working
body: <p>I think there is a problem with my ImageView.
  i created a gallery, where I can touch an image and put it in my ImageView below:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent" 
  android:layout_height="fill_parent"
  android:background="@drawable/fonddegrade"&gt;
  
  &lt;Gallery android:layout_height="wrap_content" 
      android:id="@+id/gallery" 
      android:layout_width="fill_parent" /&gt;
  
  &lt;ImageView android:layout_below="@+id/gallery"
      android:layout_height="wrap_content" 
      android:id="@+id/laphoto" 
      android:layout_width="wrap_content" 
      android:layout_centerHorizontal="true"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is perfectly working with small image, but not with big image (3264 * 1952). When I touch it (so, trying to put it in the ImageView), I have an error and my appplication crash.
  Here is my java code to display the image:</p>
  
  <pre><code>        public void onCreate(Bundle savedInstanceState) {
  
              super.onCreate(savedInstanceState);
              this.requestWindowFeature(Window.FEATURE_NO_TITLE);
              setContentView(R.layout.photo);
  
              File images; // Trouver le bon endroit de stockage
              if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()))
                  images = new File("/sdcard/MyPerformance/Photo");
              else
                  images = this.getFilesDir();
  
              images.mkdirs();
              File[] imagelist = images.listFiles(new FilenameFilter(){   
                  @Override   
                  public boolean accept(File dir, String name)   
                  {   
                      return ((name.endsWith(".jpg"))||(name.endsWith(".png")));
                  }
              });
  
              mFiles = new String[imagelist.length];
              for(int i = 0 ; i&lt; imagelist.length; i++)   
              {   
                  mFiles[i] = imagelist[i].getAbsolutePath();   
              }
              mUrls = new Uri[mFiles.length];
              for(int i = 0; i &lt; mFiles.length; i++)   
              {   
                  mUrls[i] = Uri.parse(mFiles[i]);      
              }
  
              imgView = (ImageView)findViewById(R.id.laphoto);
              if(mFiles.length != 0)
                  imgView.setImageURI(mUrls[0]);
  
              gallery = (Gallery) findViewById(R.id.gallery);
              gallery.setAdapter(new ImageAdapter(this));
  
              gallery.setOnItemClickListener(new OnItemClickListener() {
                  @Override
                  public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id) {
                      imgView.setImageURI(mUrls[position]);
                  }
              });
      }
  </code></pre>
  
  <p>Either the problem comes from the setImageURI (but I don't think this is the cause, since it's work with small image) or because of the size of the picture.</p>
  
  <p>What solution can you give me to resolve this problem?
  You have my thanks.</p>
  
  <p>PS: Why my "Hello" are always deleted?</p>