hide the last photo preview too at third party intents

This commit is contained in:
tibbi 2018-06-11 11:49:19 +02:00
parent 1f55c1345a
commit 368a9c109d
1 changed files with 4 additions and 3 deletions

View File

@ -144,9 +144,10 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener {
return super.onKeyUp(keyCode, event) return super.onKeyUp(keyCode, event)
} }
private fun hideToggleModeAbout() { private fun hideIntentButtons() {
toggle_photo_video.beGone() toggle_photo_video.beGone()
settings.beGone() settings.beGone()
last_photo_video_preview.beGone()
} }
private fun tryInitCamera() { private fun tryInitCamera() {
@ -170,14 +171,14 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener {
private fun handleIntent() { private fun handleIntent() {
if (isImageCaptureIntent()) { if (isImageCaptureIntent()) {
hideToggleModeAbout() hideIntentButtons()
val output = intent.extras?.get(MediaStore.EXTRA_OUTPUT) val output = intent.extras?.get(MediaStore.EXTRA_OUTPUT)
if (output != null && output is Uri) { if (output != null && output is Uri) {
mPreview?.setTargetUri(output) mPreview?.setTargetUri(output)
} }
} else if (intent?.action == MediaStore.ACTION_VIDEO_CAPTURE) { } else if (intent?.action == MediaStore.ACTION_VIDEO_CAPTURE) {
mIsVideoCaptureIntent = true mIsVideoCaptureIntent = true
hideToggleModeAbout() hideIntentButtons()
shutter.setImageResource(R.drawable.ic_video_rec) shutter.setImageResource(R.drawable.ic_video_rec)
} }
mPreview?.setIsImageCaptureIntent(isImageCaptureIntent()) mPreview?.setIsImageCaptureIntent(isImageCaptureIntent())