当前位置:网站首页>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
边栏推荐
- 靠卖概念上市,认养一头牛能走多远?
- High end for 8 years, how is Yadi now?
- MongoDB复制(副本集)总结
- Use of polarscatter function in MATLAB
- JS determines whether an object is empty
- PAcP learning note 3: pcap method description
- 如何让electorn打开的新窗口在window任务栏上面
- Why can basic data types call methods in JS
- Introduction and basic use of stored procedures
- [learning notes] agc010
猜你喜欢
![[learning notes] zkw segment tree](/img/18/21f455a06e8629243fc5cf4df0044c.png)
[learning notes] zkw segment tree

How to make join run faster?

JS缓动动画原理教学(超细节)
![[Presto profile series] timeline use](/img/c6/83c4fdc5f001dab34ecf18c022d710.png)
[Presto profile series] timeline use

LIS 最长上升子序列问题(动态规划、贪心+二分)

cmake 学习使用笔记(一)

Error lnk2019: unresolved external symbol

Japanese government and enterprise employees got drunk and lost 460000 information USB flash drives. They publicly apologized and disclosed password rules

提升树莓派性能的方法

单片机学习笔记之点亮led 灯
随机推荐
shell 批量文件名(不含扩展名)小写改大写
Milkdown control icon
Read PG in data warehouse in one article_ stat
[learning notes] agc010
JS slow motion animation principle teaching (super detail)
Split screen bug notes
PCAP学习笔记二:pcap4j源码笔记
OSI 七层模型
MATLAB中polarscatter函数使用
DrawerLayout禁止侧滑显示
JS中为什么基础数据类型可以调用方法
Storage principle inside mongodb
Write it down once Net a new energy system thread surge analysis
mysql 局域网内访问不到的问题
Milkdown 控件图标
Practical case: using MYCAT to realize read-write separation of MySQL
Some principles of mongodb optimization
Practical example of propeller easydl: automatic scratch recognition of industrial parts
Esp32 construction engineering add components
Cookie and session comparison