From 83881bfc0615dd08d81e6c5fd52483326efc2d73 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 10 Apr 2022 16:47:30 +0200 Subject: [PATCH] make sure we use proper colors at PhotoVideoActivity too --- .../gallery/pro/activities/PhotoVideoActivity.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 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 5510292ff..99561266c 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 @@ -7,9 +7,11 @@ import android.graphics.drawable.ColorDrawable import android.net.Uri import android.os.Bundle import android.provider.MediaStore +import android.text.Html import android.view.Menu import android.view.MenuItem import android.view.View +import android.view.WindowInsetsController import com.simplemobiletools.commons.dialogs.PropertiesDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* @@ -36,6 +38,10 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList var mIsVideo = false public override fun onCreate(savedInstanceState: Bundle?) { + if (config.isUsingSystemTheme) { + setTheme(R.style.AppTheme_Material) + } + super.onCreate(savedInstanceState) setContentView(R.layout.fragment_holder) if (checkAppSideloading()) { @@ -50,6 +56,10 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList finish() } } + + if (isRPlus()) { + window.insetsController?.setSystemBarsAppearance(0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS) + } } override fun onResume() { @@ -80,7 +90,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList findItem(R.id.menu_show_on_map).isVisible = visibleBottomActions and BOTTOM_ACTION_SHOW_ON_MAP == 0 } - updateMenuItemColors(menu) + updateMenuItemColors(menu, forceWhiteIcons = true) return true } @@ -189,7 +199,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList mIsVideo = type == TYPE_VIDEOS mMedium = Medium(null, filename, mUri.toString(), mUri!!.path!!.getParentPath(), 0, 0, file.length(), type, 0, false, 0L, 0) - supportActionBar?.title = mMedium!!.name + supportActionBar?.title = Html.fromHtml("${mMedium!!.name}") bundle.putSerializable(MEDIUM, mMedium) if (savedInstanceState == null) {