catch exceptions thrown at rotating views

This commit is contained in:
tibbi 2017-06-17 12:25:31 +02:00
parent 344c54b790
commit 9aeb993c08
1 changed files with 5 additions and 1 deletions

View File

@ -541,7 +541,11 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
private fun animateViews(degrees: Int) {
val views = arrayOf<View>(toggle_camera, toggle_flash, toggle_photo_video, change_resolution, shutter, settings, last_photo_video_preview)
for (view in views) {
rotate(view, degrees)
try {
rotate(view, degrees)
} catch (ignored: IllegalStateException) {
}
}
}