Merge pull request #437 from ltGuillaume/patch-2

Rotation button fix
This commit is contained in:
Tibor Kaputa 2017-11-03 22:30:02 +01:00 committed by GitHub
commit 035f1ed715
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,6 +240,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0f
findItem(R.id.menu_hide).isVisible = !currentMedium.name.startsWith('.')
findItem(R.id.menu_unhide).isVisible = currentMedium.name.startsWith('.')
findItem(R.id.menu_rotate).setShowAsAction(
if (mRotationDegrees !== 0f) {
MenuItem.SHOW_AS_ACTION_ALWAYS
} else {
MenuItem.SHOW_AS_ACTION_IF_ROOM
})
}
return true