First fragment from which image is selected
iv.setImageURI(Uri.fromFile(pictureFile));
String stringUri;
stringUri = pictureFile.toString();
FreeFragment ldf = new FreeFragment ();
Bundle args = new Bundle();
args.putString("Image", stringUri);
ldf.setArguments(args);
Log.d("Passing image", String.valueOf(args));
getFragmentManager().beginTransaction().add(R.id.container, ldf).commit();
Second fragment receiving image and displaying it
String bbb = getArguments().getString("Image");
Bitmap bitmap = BitmapFactory.decodeFile(bbb);
iv.setImageBitmap(bitmap);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…