当前位置:网站首页>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
边栏推荐
猜你喜欢

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

Analysis of DHCP dynamic host setting protocol

PAcP learning note 1: programming with pcap

Storage principle inside mongodb

【学习笔记】AGC010

Cinnamon taskbar speed

Milkdown 控件图标

我那“不好惹”的00后下属:不差钱,怼领导,抵制加班

OSI 七层模型

详细介绍六种开源协议(程序员须知)
随机推荐
Mongodb replication (replica set) summary
【学习笔记】AGC010
Why can basic data types call methods in JS
Japanese government and enterprise employees got drunk and lost 460000 information USB flash drives. They publicly apologized and disclosed password rules
Esp32 ① compilation environment
Ogre introduction
MongoDB优化的几点原则
Some principles of mongodb optimization
RecyclerView的数据刷新
记一次 .NET 某新能源系统 线程疯涨 分析
How to make the new window opened by electorn on the window taskbar
ESP32构解工程添加组件
xshell连接服务器把密钥登陆改为密码登陆
PHP - laravel cache
Navicat运行sql文件导入数据不全或导入失败
QQ medicine, Tencent ticket
How far can it go to adopt a cow by selling the concept to the market?
Cinnamon taskbar speed
LeetCode_ Binary search_ Medium_ 153. Find the minimum value in the rotation sort array
php——laravel缓存cache