From f9d581925b8a253e940f4bd961a6b9369b5a071e Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 21 Apr 2020 17:49:49 +0200 Subject: [PATCH] fixing the glitch with bottom actionbar being at the top --- app/build.gradle | 6 +++--- .../gallery/pro/activities/ViewPagerActivity.kt | 3 +-- .../gallery/pro/fragments/VideoFragment.kt | 7 +++++-- build.gradle | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f76de02d7..8b7da264d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,8 +58,8 @@ android { flavorDimensions "licensing" productFlavors { - proprietary { } - foss { } + proprietary {} + foss {} } lintOptions { @@ -78,7 +78,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.26.15' + implementation 'com.simplemobiletools:commons:5.26.18' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index 710a6caf9..bce53fb3f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -762,8 +762,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun initBottomActionsLayout() { - val useNavigationBarHeight = if (navigationBarBottom) navigationBarHeight else 0 - bottom_actions.layoutParams.height = resources.getDimension(R.dimen.bottom_actions_height).toInt() + useNavigationBarHeight + bottom_actions.layoutParams.height = resources.getDimension(R.dimen.bottom_actions_height).toInt() + navigationBarHeight if (config.bottomActions) { bottom_actions.beVisible() } else { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt index b69396ea8..e15f2486d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt @@ -28,7 +28,10 @@ import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.gallery.pro.R import com.simplemobiletools.gallery.pro.activities.PanoramaVideoActivity import com.simplemobiletools.gallery.pro.activities.VideoActivity -import com.simplemobiletools.gallery.pro.extensions.* +import com.simplemobiletools.gallery.pro.extensions.config +import com.simplemobiletools.gallery.pro.extensions.getVideoDuration +import com.simplemobiletools.gallery.pro.extensions.hasNavBar +import com.simplemobiletools.gallery.pro.extensions.parseFileChannel import com.simplemobiletools.gallery.pro.helpers.* import com.simplemobiletools.gallery.pro.models.Medium import com.simplemobiletools.gallery.pro.views.MediaSideScroll @@ -457,7 +460,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S private fun initTimeHolder() { var right = 0 - var bottom = if (context!!.navigationBarBottom) context!!.navigationBarHeight else 0 + var bottom = context!!.navigationBarHeight if (mConfig.bottomActions) { bottom += resources.getDimension(R.dimen.bottom_actions_height).toInt() } diff --git a/build.gradle b/build.gradle index 7c3d47b8e..1964c5972 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.2' + classpath 'com.android.tools.build:gradle:3.6.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" if (is_proprietary) { classpath 'ly.img.android.pesdk:plugin:7.2.0'