I wanted to return the image from AddMoreClaims to AddClaims listView
. When I click the submit button
in AddM
I think you are not compressing the bmp where you should do it.
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent returnIntent = new Intent();
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] bytes = stream.toByteArray();
returnIntent.putExtra("BMP", bytes);
setResult(Activity.RESULT_OK, returnIntent);
finish();
}
});
Then you should to uncompress where you need to show the image
byte[] bytes = data.getByteArrayExtra("BMP");
Bitmap bmp = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
imageView.setImageBitmap(bmp);