Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何禁用滑动导航栏。在沉浸式模式下,当我在屏幕上下拉或向上显示导航栏时如何禁用或忽略它
谢谢!
您可以尝试使用 DrawerLayout.LOCK_MODE_LOCKED_CLOSED 禁用它基本上您正在锁定您的抽屉,因此它不会用手势打开
锁定:
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
开锁:
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);