diff --git a/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/dialog/ImageViewerDialog.kt b/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/dialog/ImageViewerDialog.kt index bfb14f57..6e4bc7be 100644 --- a/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/dialog/ImageViewerDialog.kt +++ b/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/dialog/ImageViewerDialog.kt @@ -18,6 +18,8 @@ package com.stfalcon.imageviewer.viewer.dialog import android.content.Context import android.view.KeyEvent +import android.view.View +import android.view.WindowManager import android.widget.ImageView import androidx.appcompat.app.AlertDialog import com.stfalcon.imageviewer.R @@ -39,6 +41,12 @@ internal class ImageViewerDialog( else R.style.ImageViewerDialog_Default + private val dialogSystemUiVisibility: Int + get() = if (builderData.shouldStatusBarHide) + 0 + else + View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + init { setupViewerView() dialog = AlertDialog @@ -50,6 +58,7 @@ internal class ImageViewerDialog( setOnShowListener { viewerView.open(builderData.transitionView, animateOpen) } setOnDismissListener { builderData.onDismissListener?.onDismiss() } } + dialog.window?.decorView?.systemUiVisibility = dialogSystemUiVisibility } fun show(animate: Boolean) { diff --git a/imageviewer/src/main/res/values-v29/styles.xml b/imageviewer/src/main/res/values-v29/styles.xml new file mode 100644 index 00000000..9b4eb198 --- /dev/null +++ b/imageviewer/src/main/res/values-v29/styles.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/imageviewer/src/main/res/values/styles.xml b/imageviewer/src/main/res/values/styles.xml index 206484c4..ab14c983 100644 --- a/imageviewer/src/main/res/values/styles.xml +++ b/imageviewer/src/main/res/values/styles.xml @@ -5,8 +5,11 @@ + +