1

I am creating an app which uses the camera app to take pictures. Once I return from the camera app the entire view gets recreated. To stop this I have added

android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden"

in the Manifest file for the specified activities. But this is still happening.

To be more precise of my issue, I am using Activity Group with TabHost. After a picture is taken using the camera I am redirecting the user to a different screen. But this is not working as the entire view is reloaded. Instead the user is taken back to the first screen in activity group.

I dont want this to happen. Is it posible to set orientation fro camera! How can I do this properly?

For those interested I am adding the code which I use to start camera

Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Uri pictureUri = Uri.fromFile(new File("/sdcard/myimage.jpg"));
camera.putExtra(MediaStore.EXTRA_OUTPUT, pictureUri);
this.getParent().startActivityForResult(camera, PICTURE_RESULT);

Thanks

4

0 回答 0