Yardımınızı bekliyorum.
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
// System.out.println("RESULT_OK");
switch (requestCode) {
case SELECT_GALLERY_IMAGE_CODE_TO_STICKER : {
ArrayList<Uri> dk = data.getParcelableArrayListExtra(Define.INTENT_PATH);
Uri filepath= dk.get(0) ;
Bitmap bitmap =null;
try {
bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), filepath);
} catch (IOException e) {
}
File file = getFileFromBitmap(bitmap);
EditImageActivity.start(this, file.getAbsolutePath() ,file.getAbsolutePath(), EDITOR_IMAGE_CODE_TO_STICKER);
break;
}
case SELECT_GALLERY_IMAGE_CODE_TO_TRY_IMAGE : {
ArrayList<Uri> dk = data.getParcelableArrayListExtra(Define.INTENT_PATH);
Uri filepath= dk.get(0) ;
Bitmap bitmap =null;
try {
bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), filepath);
} catch (IOException e) {
}
File file = getFileFromBitmap(bitmap);
EditImageActivity.start(this,file.getAbsolutePath() ,file.getAbsolutePath(), EDITOR_IMAGE_CODE_TO_TRY_IMAGE);
}
case REMOVE_BG_IMAGE_CODE_TO_STICKER: {
String newFilePath = data.getStringExtra(CutOut.CUTOUT_EXTRA_RESULT);
File file = new File(newFilePath);
String filePath = file.getPath();
Bitmap bitmap = BitmapFactory.decodeFile(filePath);
if (bitmap==null){
Toast.makeText(this, "null", Toast.LENGTH_SHORT).show();
}
stickersList.add(bitmap);
adapter.notifyDataSetChanged();
break;
}
case REMOVE_BG__IMAGE_CODE_TO_TRY_IMAGE: {
String newFilePath = data.getStringExtra(CutOut.CUTOUT_EXTRA_RESULT);
File file = new File(newFilePath);
String filePath = file.getPath();
Bitmap bitmap = BitmapFactory.decodeFile(filePath);
if (bitmap==null){
Toast.makeText(this, "null", Toast.LENGTH_SHORT).show();
}