diff --git a/app/build.gradle b/app/build.gradle index 681a5ee1..621a58fc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -64,7 +64,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:1123a20745' + implementation 'com.github.SimpleMobileTools:Simple-Commons:bb9c9e8714' implementation 'com.github.tibbi:AndroidPdfViewer:da57ff410e' implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootShell:1.6' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 369a1b5f..345fa572 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -94,7 +94,8 @@ + android:label="@string/pdf_viewer" + android:theme="@style/TranslucentTheme"> diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt index dc59e77a..c27d7032 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt @@ -5,14 +5,12 @@ import android.graphics.Color import android.os.Bundle import android.print.PrintAttributes import android.print.PrintManager -import android.view.WindowInsetsController import android.view.WindowManager import android.widget.RelativeLayout import com.github.barteksc.pdfviewer.scroll.DefaultScrollHandle import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.REAL_FILE_PATH import com.simplemobiletools.commons.helpers.isPiePlus -import com.simplemobiletools.commons.helpers.isRPlus import com.simplemobiletools.filemanager.pro.R import com.simplemobiletools.filemanager.pro.extensions.hideSystemUI import com.simplemobiletools.filemanager.pro.extensions.showSystemUI @@ -24,7 +22,7 @@ class PDFViewerActivity : SimpleActivity() { private var isFullScreen = false override fun onCreate(savedInstanceState: Bundle?) { - useDynamicTheme = false + showTransparentTop = true super.onCreate(savedInstanceState) setContentView(R.layout.activity_pdf_viewer) @@ -33,8 +31,12 @@ class PDFViewerActivity : SimpleActivity() { return } - window.decorView.setBackgroundColor(getProperBackgroundColor()) checkNotchSupport() + pdf_viewer_toolbar.apply { + setTitleTextColor(Color.WHITE) + overflowIcon = resources.getColoredDrawableWithColor(R.drawable.ic_three_dots_vector, Color.WHITE) + navigationIcon = resources.getColoredDrawableWithColor(R.drawable.ic_arrow_left_vector, Color.WHITE) + } if (intent.extras?.containsKey(REAL_FILE_PATH) == true) { realFilePath = intent.extras?.get(REAL_FILE_PATH)?.toString() ?: "" @@ -43,15 +45,11 @@ class PDFViewerActivity : SimpleActivity() { setupMenu() checkIntent() - if (isRPlus()) { - window.insetsController?.setSystemBarsAppearance(0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS) - } } override fun onResume() { super.onResume() - window.statusBarColor = Color.TRANSPARENT - setTranslucentNavigation() + window.navigationBarColor = Color.TRANSPARENT } private fun setupMenu() {