diff --git a/app/build.gradle b/app/build.gradle index 4b22423ea..c9d936f65 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,7 +45,7 @@ ext { } dependencies { - compile 'com.simplemobiletools:commons:2.38.1' + compile 'com.simplemobiletools:commons:2.38.2' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.7.2' compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt index 2c1c3e012..496584e12 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -372,7 +372,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList, fun bindView(medium: Medium, displayFilenames: Boolean, scrollHorizontally: Boolean, isListViewType: Boolean, textColor: Int, animateGifs: Boolean, cropThumbnails: Boolean): View { itemView.apply { - play_outline.visibility = if (medium.video) View.VISIBLE else View.GONE + play_outline.beVisibleIf(medium.video) photo_name.beVisibleIf(displayFilenames || isListViewType) photo_name.text = medium.name activity.loadImage(medium.path, medium_thumbnail, scrollHorizontally, animateGifs, cropThumbnails) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 173becce8..697434a6f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -221,7 +221,7 @@ class PhotoFragment : ViewPagerFragment() { } private fun addZoomableView() { - if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.visibility == View.GONE) { + if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.isGone()) { view.subsampling_view.apply { setBitmapDecoderClass(GlideDecoder::class.java) maxScale = 10f @@ -320,7 +320,7 @@ class PhotoFragment : ViewPagerFragment() { override fun fullscreenToggled(isFullscreen: Boolean) { this.isFullscreen = isFullscreen view.photo_details.apply { - if (visibility == View.VISIBLE) { + if (isVisible()) { animate().y(getExtendedDetailsY(height)) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index 4bbb1e138..423ecd1ea 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -594,7 +594,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee mIsFullscreen = isFullscreen checkFullscreen() mView.video_details.apply { - if (visibility == View.VISIBLE) { + if (isVisible()) { animate().y(getExtendedDetailsY(height)) } }