title: unable to pick gallery image to imagebutton?
body: <p>I'm getting the gallery intent but not able to set image on Image-Button although i have given the required permissions. </p>
  
  <pre><code>imagg.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent gallery = new Intent(Intent.ACTION_GET_CONTENT);
              gallery.setType("image/=");
              startActivityForResult(gallery, res);
          }
      });
  
       @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      if (requestCode == res &amp;&amp; resultCode == RESULT_OK) {
          Uri imageurl = data.getData();
          imagg.setImageURI(imageurl);
      }
  </code></pre>