From e5a6b97510156c21dd941cae9aca528f341f67c4 Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Wed, 4 Sep 2024 14:39:54 +0530 Subject: [PATCH] Fixed: File drawer was showing on Tabs screen. * Disabled the right drawer when the tabs screen is opened, the drawer will be enable when the tabs screen will close. --- .../java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.kt index 86467bf14a..3577aa62c2 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.kt @@ -29,6 +29,7 @@ import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.Toolbar import androidx.core.net.toUri import androidx.core.os.bundleOf +import androidx.core.view.GravityCompat import androidx.drawerlayout.widget.DrawerLayout import androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_LOCKED_CLOSED import androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_UNLOCKED @@ -244,11 +245,15 @@ abstract class CoreMainActivity : BaseActivity(), WebViewProvider { it.syncState() } drawerContainerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED) + // Enable the right drawer + drawerContainerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED, GravityCompat.END) } open fun disableDrawer() { drawerToggle?.isDrawerIndicatorEnabled = false drawerContainerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED) + // Disable the right drawer + drawerContainerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED, GravityCompat.END) } open fun onNavigationItemSelected(item: MenuItem): Boolean {