diff --git a/app/build.gradle b/app/build.gradle index 41d150111..6c1076458 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.5.10' + implementation 'com.simplemobiletools:commons:4.5.11' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.android.support:multidex:1.0.3' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt index a8820e8cd..b3222de9b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt @@ -76,9 +76,10 @@ fun SimpleActivity.launchAbout() { FAQItem(R.string.faq_12_title, R.string.faq_12_text), FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons)) - startAboutActivity(R.string.app_name, LICENSE_GLIDE or LICENSE_CROPPER or LICENSE_MULTISELECT or LICENSE_RTL - or LICENSE_SUBSAMPLING or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GIF_DRAWABLE or LICENSE_PHOTOVIEW or LICENSE_EXOPLAYER or - LICENSE_PANORAMA_VIEW or LICENSE_SANSELAN or LICENSE_FILTERS, BuildConfig.VERSION_NAME, faqItems) + val licenses = LICENSE_GLIDE or LICENSE_CROPPER or LICENSE_MULTISELECT or LICENSE_RTL or LICENSE_SUBSAMPLING or LICENSE_PATTERN or + LICENSE_REPRINT or LICENSE_GIF_DRAWABLE or LICENSE_PHOTOVIEW or LICENSE_EXOPLAYER or LICENSE_PANORAMA_VIEW or LICENSE_SANSELAN or LICENSE_FILTERS + + startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems) } fun AppCompatActivity.showSystemUI(toggleActionBarVisibility: Boolean) { 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 5b5ce0d04..dd8bee650 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -89,7 +89,6 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S } mIsFullscreen = activity!!.window.decorView.systemUiVisibility and View.SYSTEM_UI_FLAG_FULLSCREEN == View.SYSTEM_UI_FLAG_FULLSCREEN - mView!!.video_play_outline.alpha = if (mIsFullscreen) 0f else PLAY_PAUSE_VISIBLE_ALPHA setupPlayer() if (savedInstanceState != null) { @@ -411,9 +410,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S mExoPlayer?.playWhenReady = true mView!!.video_play_outline.setImageResource(R.drawable.ic_pause) activity!!.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) - mHidePauseHandler.postDelayed({ - mView!!.video_play_outline.animate().alpha(0f).start() - }, HIDE_PAUSE_DELAY) + schedulePlayPauseFadeOut() } private fun pauseVideo() { @@ -429,6 +426,14 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S mView?.video_play_outline?.setImageResource(R.drawable.ic_play) mView?.video_play_outline?.alpha = PLAY_PAUSE_VISIBLE_ALPHA activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + schedulePlayPauseFadeOut() + } + + private fun schedulePlayPauseFadeOut() { + mHidePauseHandler.removeCallbacksAndMessages(null) + mHidePauseHandler.postDelayed({ + mView!!.video_play_outline.animate().alpha(0f).start() + }, HIDE_PAUSE_DELAY) } private fun videoEnded() = mExoPlayer?.currentPosition ?: 0 >= mExoPlayer?.duration ?: 0