make sure the bottom button visibility is updated on the main thread

This commit is contained in:
tibbi 2018-05-31 12:44:24 +02:00
parent a8aba856b7
commit 94488adb24
1 changed files with 6 additions and 4 deletions

View File

@ -279,10 +279,12 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener {
}
fun toggleBottomButtons(hide: Boolean) {
val alpha = if (hide) 0f else 1f
shutter.animate().alpha(alpha).start()
toggle_camera.animate().alpha(alpha).start()
toggle_flash.animate().alpha(alpha).start()
runOnUiThread {
val alpha = if (hide) 0f else 1f
shutter.animate().alpha(alpha).start()
toggle_camera.animate().alpha(alpha).start()
toggle_flash.animate().alpha(alpha).start()
}
shutter.isClickable = !hide
toggle_camera.isClickable = !hide