Java Code Examples for android.support.v4.widget.DrawerLayout#LOCK_MODE_LOCKED_CLOSED
The following examples show how to use
android.support.v4.widget.DrawerLayout#LOCK_MODE_LOCKED_CLOSED .
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: ActionBarToggleAdapter.java From SlidingRootNav with Apache License 2.0 | 5 votes |
@Override public int getDrawerLockMode(int edgeGravity) { if (adaptee.isMenuLocked() && adaptee.isMenuClosed()) { return DrawerLayout.LOCK_MODE_LOCKED_CLOSED; } else if (adaptee.isMenuLocked() && !adaptee.isMenuClosed()) { return DrawerLayout.LOCK_MODE_LOCKED_OPEN; } else { return DrawerLayout.LOCK_MODE_UNLOCKED; } }
Example 2
Source File: WalletActivity.java From xmrwallet with Apache License 2.0 | 5 votes |
@Override public void setDrawerEnabled(boolean enabled) { Timber.d("setDrawerEnabled %b", enabled); final int lockMode = enabled ? DrawerLayout.LOCK_MODE_UNLOCKED : DrawerLayout.LOCK_MODE_LOCKED_CLOSED; drawer.setDrawerLockMode(lockMode); drawerToggle.setDrawerIndicatorEnabled(enabled); invalidateOptionsMenu(); // menu may need to be changed }
Example 3
Source File: HomeActivity.java From Pasta-Music with Apache License 2.0 | 5 votes |
@Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { if (drawer_layout != null && drawer_layout.getDrawerLockMode(Gravity.LEFT) != DrawerLayout.LOCK_MODE_LOCKED_CLOSED) drawer_layout.openDrawer(Gravity.LEFT); else onBackPressed(); } return false; }
Example 4
Source File: HomeActivity.java From Pasta-for-Spotify with Apache License 2.0 | 5 votes |
@Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { if (drawer_layout != null && drawer_layout.getDrawerLockMode(Gravity.LEFT) != DrawerLayout.LOCK_MODE_LOCKED_CLOSED) drawer_layout.openDrawer(Gravity.LEFT); else onBackPressed(); } return false; }
Example 5
Source File: DrawerHelper.java From screenplay with MIT License | 4 votes |
public boolean isLockedShut() { return getLayout().getDrawerLockMode(Gravity.LEFT) == DrawerLayout.LOCK_MODE_LOCKED_CLOSED; }