mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
catch exceptions thrown at rotating views
This commit is contained in:
@ -541,7 +541,11 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
|
|||||||
private fun animateViews(degrees: Int) {
|
private fun animateViews(degrees: Int) {
|
||||||
val views = arrayOf<View>(toggle_camera, toggle_flash, toggle_photo_video, change_resolution, shutter, settings, last_photo_video_preview)
|
val views = arrayOf<View>(toggle_camera, toggle_flash, toggle_photo_video, change_resolution, shutter, settings, last_photo_video_preview)
|
||||||
for (view in views) {
|
for (view in views) {
|
||||||
rotate(view, degrees)
|
try {
|
||||||
|
rotate(view, degrees)
|
||||||
|
} catch (ignored: IllegalStateException) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user