In dialogs when I do swipe down gesture, a black bare appears over navigation menu and stays there.
Parent activity already has a navigation menu bar, and it behaves as it should. Dialog swipe down gestue overrides correct behaviour and makes the black menu bar stick.
<code>fun showAboutUsDialog(){
dialog?.dismiss() // Dismiss the current dialog, if any
dialog = Dialog(this)
dialog?.setContentView(R.layout.about_modal);
// Check if dialog is not null before accessing it
if (dialog != null) {
val versionText : TextView = dialog!!.findViewById(R.id.version);
val buttonOk : TextView = dialog!!.findViewById(R.id.button_ok);
buttonOk.setOnClickListener{
dialog!!.dismiss()
}
"${getString(R.string.version)} ${BuildConfig.VERSION_NAME}".also { versionText.text = it }
dialog?.getWindow()?.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
dialog!!.show();
}
}
</code>
<code>fun showAboutUsDialog(){
dialog?.dismiss() // Dismiss the current dialog, if any
dialog = Dialog(this)
dialog?.setContentView(R.layout.about_modal);
// Check if dialog is not null before accessing it
if (dialog != null) {
val versionText : TextView = dialog!!.findViewById(R.id.version);
val buttonOk : TextView = dialog!!.findViewById(R.id.button_ok);
buttonOk.setOnClickListener{
dialog!!.dismiss()
}
"${getString(R.string.version)} ${BuildConfig.VERSION_NAME}".also { versionText.text = it }
dialog?.getWindow()?.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
dialog!!.show();
}
}
</code>
fun showAboutUsDialog(){
dialog?.dismiss() // Dismiss the current dialog, if any
dialog = Dialog(this)
dialog?.setContentView(R.layout.about_modal);
// Check if dialog is not null before accessing it
if (dialog != null) {
val versionText : TextView = dialog!!.findViewById(R.id.version);
val buttonOk : TextView = dialog!!.findViewById(R.id.button_ok);
buttonOk.setOnClickListener{
dialog!!.dismiss()
}
"${getString(R.string.version)} ${BuildConfig.VERSION_NAME}".also { versionText.text = it }
dialog?.getWindow()?.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
dialog!!.show();
}
}
<code> I tried disabling navigation bar in dialgogs. Even though the flags are deprecated, navigation bar does not apper when I am in the dialog screen, but when I close the screen, the navigation bar reappears on the parent screen as a black bar and stays there.
dialog?.window?.decorView?.apply {
systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE or
View.SYSTEM_UI_FLAG_FULLSCREEN or
View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY or
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
SYSTEM_UI_FLAG_HIDE_NAVIGATION
}
</code>
<code> I tried disabling navigation bar in dialgogs. Even though the flags are deprecated, navigation bar does not apper when I am in the dialog screen, but when I close the screen, the navigation bar reappears on the parent screen as a black bar and stays there.
dialog?.window?.decorView?.apply {
systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE or
View.SYSTEM_UI_FLAG_FULLSCREEN or
View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY or
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
SYSTEM_UI_FLAG_HIDE_NAVIGATION
}
</code>
I tried disabling navigation bar in dialgogs. Even though the flags are deprecated, navigation bar does not apper when I am in the dialog screen, but when I close the screen, the navigation bar reappears on the parent screen as a black bar and stays there.
dialog?.window?.decorView?.apply {
systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE or
View.SYSTEM_UI_FLAG_FULLSCREEN or
View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY or
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
SYSTEM_UI_FLAG_HIDE_NAVIGATION
}