hide/show views during count down
This commit is contained in:
parent
ef2f3eb766
commit
048489cbbb
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue