add animations to image rotating via menu buttons

This commit is contained in:
tibbi
2019-02-07 14:42:59 +01:00
parent 076559aa9d
commit 64f0bd41b1
2 changed files with 9 additions and 5 deletions

View File

@ -557,10 +557,14 @@ class PhotoFragment : ViewPagerFragment() {
}
fun rotateImageViewBy(degrees: Int) {
mCurrentRotationDegrees = (mCurrentRotationDegrees + degrees) % 360
mLoadZoomableViewHandler.removeCallbacksAndMessages(null)
mIsSubsamplingVisible = false
loadBitmap(degrees)
if (mIsSubsamplingVisible) {
mView.subsampling_view.rotateBy(degrees)
} else {
mCurrentRotationDegrees = (mCurrentRotationDegrees + degrees) % 360
mLoadZoomableViewHandler.removeCallbacksAndMessages(null)
mIsSubsamplingVisible = false
loadBitmap(degrees)
}
}
private fun initExtendedDetails() {