title: how to get the Image from Gallery and set into Image view in Fragments?
body: <p>I have Written code for getting  the Image from gallery and set into the Image View but the image is not set.This is my problem suggest me guys</p>
  
  <p>Here is My Code: </p>
  
  <pre><code> btnUpload.setOnClickListener(new View.OnClickListener()
  {
              @Override
              public void onClick(View v) 
  {
                  Intent i = new Intent(Intent.ACTION_PICK,
                    android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
  
                  getActivity().startActivityForResult(i, 1);
  
              }
          });
  
  
   @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data)
  {
          super.onActivityResult(requestCode, resultCode, data);
  
          if (requestCode == 1 &amp;&amp; null != data) 
  {
              Uri selectedImage = data.getData();
              String[] filePathColumn = {MediaStore.Images.Media.DATA};
  
              Cursor cursor = getActivity().getContentResolver().query(selectedImage,
                      filePathColumn, null, null, null);
              cursor.moveToFirst();
  
              int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
              String picturePath = cursor.getString(columnIndex);
              //int pic=Integer.parseInt(picturePath);
              cursor.close();
  
              //ImageView imageView = (ImageView) mFormView.findViewById(R.id.imageView);
              ivMan.setImageBitmap(BitmapFactory.decodeFile(picturePath));
  
          }
  </code></pre>
  
  <p>thanks in Advance</p>