hide/show views during count down

This commit is contained in:
darthpaul 2022-11-25 16:00:47 +00:00
parent ef2f3eb766
commit 048489cbbb
1 changed files with 19 additions and 1 deletions

View File

@ -842,7 +842,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
}
private fun scheduleTimer(timerMode: TimerMode) {
top_options.fadeOut()
hideViewsOnTimerStart()
shutter.setImageState(intArrayOf(R.attr.state_timer_cancel), true)
timer_text.beVisible()
countDownTimer = object : CountDownTimer(timerMode.millisInFuture, 1000) {
@ -858,8 +858,26 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
}.start()
}
private fun hideViewsOnTimerStart() {
top_options.fadeOut()
top_options.beInvisible()
toggle_camera.fadeOut()
toggle_camera.beInvisible()
last_photo_video_preview.fadeOut()
last_photo_video_preview.beInvisible()
camera_mode_tab.fadeOut()
camera_mode_tab.beInvisible()
}
private fun resetViewsOnTimerFinish() {
top_options.fadeIn()
top_options.beVisible()
toggle_camera.fadeIn()
toggle_camera.beVisible()
last_photo_video_preview.fadeIn()
last_photo_video_preview.beVisible()
camera_mode_tab.fadeIn()
camera_mode_tab.beVisible()
timer_text.beGone()
shutter.setImageState(intArrayOf(-R.attr.state_timer_cancel), true)
}