Skip to content

Commit

Permalink
Fixed: File drawer was showing on Tabs screen.
Browse files Browse the repository at this point in the history
* Disabled the right drawer when the tabs screen is opened, the drawer will be enable when the tabs screen will close.
  • Loading branch information
MohitMaliDeveloper authored and kelson42 committed Sep 5, 2024
1 parent 9ba28ec commit e5a6b97
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e5a6b97

Please sign in to comment.