mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-22 22:27:43 +01:00
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) {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user