protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != RESULT_OK) return; switch (requestCode) { case MainActivity.CROP_FROM_CAMERA: { String path = getTempUri().getPath(); Bitmap selectedImage = BitmapFactory.decodeFile(path); mPicture.setImageBitmap(selectedImage); mSettings.picturePath = path; break; } case MainActivity.PICK_FROM_ALBUM: { mImageCaptureUri = data.getData(); callCrop(); break; } case MainActivity.PICK_FROM_CAMERA: { callCrop(); break; } } }
private void doTakeOrigin() { String path = getTempUri().getPath(); Bitmap selectedImage = BitmapFactory.decodeFile(path); mPicture.setImageResource(R.drawable.photo); mSettings.picturePath = ""; }