SquareCamera
SquareCamera copied to clipboard
Question about integration.
Hi, I want to open another fragment after taking the picture. I've tried many, many ways and I can't do it yet. Can you help me with it? Also, if I try to do anything on the onActivityResult switch-case, I can't because it never gets to enter to the switch code.
Thanks!
You need to launch your fragment in the onPictureTaken method in the CameraFragment class:
@Override
public void onPictureTaken(byte[] data, Camera camera)
{
int rotation = getPhotoRotation();
//Log.d(TAG, "normal orientation: " + orientation);
//Log.d(TAG, "Rotate Picture by: " + rotation);
getFragmentManager()
.beginTransaction()
.replace(
R.id.fragment_container,
EditSavePhotoFragment.newInstance(data, rotation, mImageParameters.createCopy()),
EditSavePhotoFragment.TAG)
.addToBackStack(null)
.commit();
}
in this case EditSavePhotoFragment will start after the picture is taken