From c60f0d5fb2cd1b28d9a5a56c543357f6586edd64 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 4 Jan 2019 18:07:17 +0100 Subject: [PATCH] tweak the bottom navigation and status bar of PhotoVideoActivity --- .../gallery/pro/activities/PhotoVideoActivity.kt | 15 ++++++++++++--- app/src/main/res/layout/fragment_holder.xml | 6 ++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt index 8f660124d..cddd19ffe 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt @@ -42,7 +42,6 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList public override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.fragment_holder) - setTranslucentNavigation() handlePermission(PERMISSION_WRITE_STORAGE) { if (it) { @@ -56,7 +55,15 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList override fun onResume() { super.onResume() - supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.gradient_background_flipped)) + supportActionBar?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) + window.statusBarColor = Color.TRANSPARENT + + if (config.bottomActions) { + window.navigationBarColor = Color.TRANSPARENT + } else { + setTranslucentNavigation() + } + if (config.blackBackground) { updateStatusbarColor(Color.BLACK) } @@ -273,8 +280,10 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList showSystemUI(true) } + val newAlpha = if (mIsFullScreen) 0f else 1f + top_shadow.animate().alpha(newAlpha).start() if (!bottom_actions.isGone()) { - bottom_actions.animate().alpha(if (mIsFullScreen) 0f else 1f).start() + bottom_actions.animate().alpha(newAlpha).start() } } diff --git a/app/src/main/res/layout/fragment_holder.xml b/app/src/main/res/layout/fragment_holder.xml index d10a3a193..77f5953e7 100644 --- a/app/src/main/res/layout/fragment_holder.xml +++ b/app/src/main/res/layout/fragment_holder.xml @@ -10,6 +10,12 @@ android:layout_width="match_parent" android:layout_height="match_parent"/> + +