show the Lock Orientation menu item only when the image isnt rotated

This commit is contained in:
tibbi 2017-12-29 15:47:58 +01:00
parent d353f02a51
commit 27e14b8fac

View file

@ -264,6 +264,7 @@ 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_lock_orientation).isVisible = mRotationDegrees == 0f
findItem(R.id.menu_lock_orientation).title = getString(if (mIsOrientationLocked) R.string.unlock_orientation else R.string.lock_orientation)
findItem(R.id.menu_rotate).setShowAsAction(
if (mRotationDegrees != 0f) {