我想從AddMoreClaims到AddClaimslistView
回圖像。當我點擊AddMoreClaims提交button
時,我收到消息E/JavaBinder﹕ !!! FAILED BINDER TRANSACTION !!!
。仍然得到錯誤而失敗粘結劑交易雖然有壓縮它
我用這個method但仍然得到這個惱人的消息!
AddMoreClaims
Bitmap bmp,photo;
byte[] bytes;
@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case RESULT_LOAD_IMAGE:
if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK & data != null && data.getData() !=null) {
selectedImage = data.getData();
try
{
photo= MediaStore.Images.Media.getBitmap(getContentResolver(), selectedImage);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
photo.compress(Bitmap.CompressFormat.PNG, 100, stream);
bytes= stream.toByteArray();
bmp = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
imageView.setImageBitmap(bmp); // image get displayed
}catch(IOException e)
{
e.printStackTrace();
}
}
break;
選定的圖像將在imageView
AddMoreClaims被顯示。
當提交button
被點擊時,我希望它返回到AddClaims。
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent returnIntent = new Intent();
returnIntent.putExtra("BMP", bmp);
setResult(Activity.RESULT_OK, returnIntent);
finish();
}
});
這裏有什麼問題?我錯過了什麼嗎?