当前位置:网站首页>Drawerlayout suppress sideslip display
Drawerlayout suppress sideslip display
2022-07-07 13:29:00 【The ancient moon cannot be seen by modern people. This moon onc】
explain :
Android DrawerLayout Sometimes the sideslip display is not required , At this time, it is necessary to prohibit side sliding .
Just one line of code .
Code :
// No gesture sliding
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);// Open gesture slide
mDrawer_layout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED)After initialization, add the following :
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
toggle.syncState();
————————————————
Reproduced in :https://blog.csdn.net/u012246458/article/details/80162799
边栏推荐
- 线程池拒绝策略最佳实践
- [learning notes] segment tree selection
- User management summary of mongodb
- Some principles of mongodb optimization
- 聊聊伪共享
- Test next summary
- LIS longest ascending subsequence problem (dynamic programming, greed + dichotomy)
- LIS 最长上升子序列问题(动态规划、贪心+二分)
- 日本政企员工喝醉丢失46万信息U盘,公开道歉又透露密码规则
- My "troublesome" subordinates after 00: not bad for money, against leaders, and resist overtime
猜你喜欢
随机推荐
Signal strength (RSSI) knowledge sorting
[learning notes] zkw segment tree
xshell连接服务器把密钥登陆改为密码登陆
PHP - laravel cache
【学习笔记】zkw 线段树
Write it down once Net a new energy system thread surge analysis
10 张图打开 CPU 缓存一致性的大门
Use of polarscatter function in MATLAB
抓细抓实抓好安全生产各项工作 全力确保人民群众生命财产安全
Mongodb slice summary
Vscade editor esp32 header file wavy line does not jump completely solved
记一次 .NET 某新能源系统 线程疯涨 分析
How to make the new window opened by electorn on the window taskbar
我那“不好惹”的00后下属:不差钱,怼领导,抵制加班
move base参数解析及经验总结
将数学公式在el-table里面展示出来
Final review notes of single chip microcomputer principle
Vscode编辑器ESP32头文件波浪线不跳转彻底解决
error LNK2019: 无法解析的外部符号
Ikvm of toolbox Net project new progress

![[learning notes] zkw segment tree](/img/18/21f455a06e8629243fc5cf4df0044c.png)






