title: Set uri.parse resource as ImageView
body: <p>i am trying to set ImageView as resource of uri.pare.</p>
  
  <p>to perform this task i tried this but it's not working: failed to load image</p>
  
  <p>method 1:</p>
  
  <pre><code>Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
                  intent.addCategory(Intent.CATEGORY_DEFAULT);
                  intent.setDataAndType(Uri.parse("R.id.imageView1"),"image/*");
                  intent.putExtra("mimeType", "image/*");
                  startActivity(Intent.createChooser(intent, "Set as:"));
  </code></pre>
  
  <p>method 2:</p>
  
  <pre><code>Intent intent = new Intent();
                   intent.setAction(Intent.ACTION_VIEW);
                   intent.setDataAndType(Uri.parse("R.id.imageView1"),"image/*");
                   startActivity(intent);
  </code></pre>
  
  <p>i am not able to set ImageView as resource of uri.parse, so please help me how do i set ImageView as resource of uri.parse </p>
  
  <p>i found a code but i am not understanding how to adjust this code with my code:</p>
  
  <p>this is i found:</p>
  
  <pre><code>ImageView imgView = (ImageView) findViewById(R.id.image3);
  
      imgView.setImageURI(Uri.parse("file://mnt/sdcard/d2.jpg"));
  </code></pre>
  
  <p>how do i adjust it with my code:</p>
  
  <pre><code>intent.setDataAndType(Uri.parse("R.id.imageView1"),"image/*");
  </code></pre>