0

I want to show the captured image after somebody clicks it. The current approach I'm using is creating a new Activity for ImageView after saving the picture to a SD card but this is taking a lot of time and a lag is visible.

After the ImageView activity, I want to again switch to CameraPreview activity. Could this be done using a single activity and replacing the preview with ImageView in the same activity?

R1234
  • 484
  • 9
  • 20

1 Answers1

3

Of course this can be done with one activity.

  • Initially show the CameraPreview and hide the ImageView
  • When the user "clicks it"
    • stop the preview
    • take the picture and show it in the ImageView (for example like shown in this answer)
    • hide the CameraPreview, show the ImageView
  • When the user taps some other button (or whatever)
    • start the preview
    • hide the ImageView show the CameraPreview
Community
  • 1
  • 1
H.Frem
  • 46
  • 4
  • what do you mean by take the picture and show? You mean save it and then load it from there? – R1234 Sep 28 '16 at 07:59