title: android Image view out of memory error
body: <p>In my Android project I have imageButton , and after clicking on it , it must open new Activity with imageView , and in my new Activity I must see the ImageButton's image only in large type , my image size is 17mb , and I got out of memory error. But my code works for images with little size. Can somebody help to resize image or change some bitmap options or advice other way? I'm new in android , and sorry for bad English :)</p>
  
  <p>Here is my new Activity's XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:id="@+id/LL11"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"&gt;
  &lt;TextView
   android:id="@+id/textView1"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:text="Here must be an image"&gt;
  &lt;/TextView&gt;
  
  &lt;ImageView
      android:id="@+id/imageView1"
      android:maxWidth="10px"
      android:maxHeight="10px"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:src="@drawable/ic_action_search" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and  the java code </p>
  
  <pre><code>package com.example.example;
  
  import android.app.Activity;
  import android.net.Uri;
  import android.os.Bundle;
  import android.widget.ImageView;
  
  package com.example.example;
  
  import android.app.Activity;
  import android.net.Uri;
  import android.os.Bundle;
  import android.widget.ImageView;
  
  public class ActivityTwo extends Activity {
  
  
      @Override
        protected void onCreate(Bundle savedInstanceState) 
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.custom_dialog);
          Bundle extras = getIntent().getExtras();
          String path = extras.getString("path");
          if(null != path) 
          {
              Uri myUri = Uri.parse(path);
              super.onCreate(savedInstanceState);
              ImageView img1 = (ImageView) findViewById(R.id.imageView1);
             img1.setImageURI(myUri);
  
          }
      }
  }
  </code></pre>