make sure the bottom button visibility is updated on the main thread
This commit is contained in:
parent
a8aba856b7
commit
94488adb24
|
@ -279,10 +279,12 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun toggleBottomButtons(hide: Boolean) {
|
fun toggleBottomButtons(hide: Boolean) {
|
||||||
val alpha = if (hide) 0f else 1f
|
runOnUiThread {
|
||||||
shutter.animate().alpha(alpha).start()
|
val alpha = if (hide) 0f else 1f
|
||||||
toggle_camera.animate().alpha(alpha).start()
|
shutter.animate().alpha(alpha).start()
|
||||||
toggle_flash.animate().alpha(alpha).start()
|
toggle_camera.animate().alpha(alpha).start()
|
||||||
|
toggle_flash.animate().alpha(alpha).start()
|
||||||
|
}
|
||||||
|
|
||||||
shutter.isClickable = !hide
|
shutter.isClickable = !hide
|
||||||
toggle_camera.isClickable = !hide
|
toggle_camera.isClickable = !hide
|
||||||
|
|
Loading…
Reference in New Issue