Merge pull request #5207 from k9mail/drawer_in_search
Lock DrawerLayout closed when drawer is disabled
This commit is contained in:
commit
4d9035854e
1 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,7 @@ import android.widget.Toast
|
|||
import androidx.appcompat.app.ActionBar
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import androidx.drawerlayout.widget.DrawerLayout.DrawerListener
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
|
@ -522,6 +523,8 @@ open class MessageList :
|
|||
|
||||
private fun initializeDrawer(savedInstanceState: Bundle?) {
|
||||
if (!isDrawerEnabled) {
|
||||
val drawerLayout = findViewById<DrawerLayout>(R.id.drawerLayout)
|
||||
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue