set flash icon's visibility to GONE when not available
This commit is contained in:
parent
048489cbbb
commit
78b6469bb4
|
@ -609,8 +609,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
|
||||||
if (available) {
|
if (available) {
|
||||||
toggle_flash.beVisible()
|
toggle_flash.beVisible()
|
||||||
} else {
|
} else {
|
||||||
toggle_flash.beInvisible()
|
toggle_flash.beGone()
|
||||||
toggle_flash.setShadowIcon(R.drawable.ic_flash_off_vector)
|
|
||||||
mPreview?.setFlashlightState(FLASH_OFF)
|
mPreview?.setFlashlightState(FLASH_OFF)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -859,25 +858,17 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hideViewsOnTimerStart() {
|
private fun hideViewsOnTimerStart() {
|
||||||
top_options.fadeOut()
|
arrayOf(top_options, toggle_camera, last_photo_video_preview, camera_mode_tab).forEach {
|
||||||
top_options.beInvisible()
|
it.fadeOut()
|
||||||
toggle_camera.fadeOut()
|
it.beInvisible()
|
||||||
toggle_camera.beInvisible()
|
}
|
||||||
last_photo_video_preview.fadeOut()
|
|
||||||
last_photo_video_preview.beInvisible()
|
|
||||||
camera_mode_tab.fadeOut()
|
|
||||||
camera_mode_tab.beInvisible()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun resetViewsOnTimerFinish() {
|
private fun resetViewsOnTimerFinish() {
|
||||||
top_options.fadeIn()
|
arrayOf(top_options, toggle_camera, last_photo_video_preview, camera_mode_tab).forEach {
|
||||||
top_options.beVisible()
|
it.fadeIn()
|
||||||
toggle_camera.fadeIn()
|
it.beVisible()
|
||||||
toggle_camera.beVisible()
|
}
|
||||||
last_photo_video_preview.fadeIn()
|
|
||||||
last_photo_video_preview.beVisible()
|
|
||||||
camera_mode_tab.fadeIn()
|
|
||||||
camera_mode_tab.beVisible()
|
|
||||||
timer_text.beGone()
|
timer_text.beGone()
|
||||||
shutter.setImageState(intArrayOf(-R.attr.state_timer_cancel), true)
|
shutter.setImageState(intArrayOf(-R.attr.state_timer_cancel), true)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue