fix #1265, hide the Panorama button at fullscreen view

This commit is contained in:
tibbi 2019-02-14 23:09:01 +01:00
parent 9fabd88420
commit 05e666890f

View file

@ -515,6 +515,9 @@ class PhotoFragment : ViewPagerFragment() {
} }
mView.panorama_outline.beVisibleIf(mIsPanorama) mView.panorama_outline.beVisibleIf(mIsPanorama)
if (mIsFullscreen) {
mView.panorama_outline.alpha = 0f
}
} }
private fun getImageOrientation(): Int { private fun getImageOrientation(): Int {
@ -611,7 +614,8 @@ class PhotoFragment : ViewPagerFragment() {
override fun fullscreenToggled(isFullscreen: Boolean) { override fun fullscreenToggled(isFullscreen: Boolean) {
this.mIsFullscreen = isFullscreen this.mIsFullscreen = isFullscreen
mView.photo_details.apply { mView.apply {
photo_details.apply {
if (mStoredShowExtendedDetails && isVisible()) { if (mStoredShowExtendedDetails && isVisible()) {
animate().y(getExtendedDetailsY(height)) animate().y(getExtendedDetailsY(height))
@ -620,6 +624,11 @@ class PhotoFragment : ViewPagerFragment() {
} }
} }
} }
if (mIsPanorama) {
panorama_outline.animate().alpha(if (isFullscreen) 0f else 1f).start()
}
}
} }
private fun getExtendedDetailsY(height: Int): Float { private fun getExtendedDetailsY(height: Int): Float {