Java Code Examples for androidx.drawerlayout.widget.DrawerLayout#setDrawerLockMode()
The following examples show how to use
androidx.drawerlayout.widget.DrawerLayout#setDrawerLockMode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InstallerUIChanger.java From InviZible with GNU General Public License v3.0 | 5 votes |
Runnable lockDrawerMenu(final boolean lock) { return () -> { DrawerLayout mDrawerLayout = mainActivity.findViewById(R.id.drawer_layout); if (lock) { mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); Log.i(LOG_TAG, "Installer: DrawerMenu locked"); } else { mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED); Log.i(LOG_TAG, "Installer: DrawerMenu unlocked"); } }; }
Example 2
Source File: CallStatsFragment.java From linphone-android with GNU General Public License v3.0 | 5 votes |
public void setDrawer(DrawerLayout drawer, RelativeLayout content) { mSideMenu = drawer; mSideMenuContent = content; if (getResources().getBoolean(R.bool.hide_in_call_stats)) { drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); } }
Example 3
Source File: MainActivity.java From lbry-android with MIT License | 4 votes |
public void lockDrawer() { DrawerLayout drawer = findViewById(R.id.drawer_layout); drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); }
Example 4
Source File: MainActivity.java From lbry-android with MIT License | 4 votes |
public void unlockDrawer() { DrawerLayout drawer = findViewById(R.id.drawer_layout); drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED); }