title: how to add image in one fragment and display it in another fragment/pass image through bundle in android
body: <p>i want to select image in one fragment and display it in another fragment.<br>
  how can i do this.
  <br>my code is this but not working<br></p>
  
  <pre><code>button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);
              startActivityForResult(gallery, 100);
          }
      });
  
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
      Uri imageUri;
      if (resultCode == RESULT_OK &amp;&amp; requestCode == 100){
          imageUri = data.getData();
          file1path = imageUri.getPath();
          TVfrontimg.setText(file1path);
      }
  }
  </code></pre>
  
  <p>and i send this using bundle</p>
  
  <pre><code>Bundle bundle = new Bundle();
  bundle.putString("image1", file1path);
  
  registerPartThreeFragment.setArguments(bundle);
  transaction.replace(R.id.FLcontainer, registerPartThreeFragment);
  transaction.addToBackStack(null);
  transaction.commit();
  </code></pre>
  
  <p>in another fragment</p>
  
  <pre><code>String imgPath = getArguments().getString("image1");
  Bitmap bitmap = BitmapFactory.decodeFile(String.valueOf(new File(imgPath)));
  imageview.setImageBitmap(bitmap);
  </code></pre>
  
  <p>but its not working.please help.</p>
  
  <p><br>
  its giving me this error<br><br>
  2020-05-30 00:16:20.808 8995-8995/com.example.deliveryapp E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /raw/storage/emulated/0/DCIM/Camera/IMG_20200319_173033.jpg (No such file or directory)</p>