Refactoring

This commit is contained in:
M66B 2020-01-02 22:07:49 +01:00
parent f1e09b3385
commit 8fd39d32ef
1 changed files with 5 additions and 1 deletions

View File

@ -76,7 +76,11 @@ public class DrawerLayoutEx extends DrawerLayout {
@Override
protected void onRestoreInstanceState(Parcelable state) {
super.onRestoreInstanceState(state);
locked = (getDrawerLockMode(Gravity.LEFT) == LOCK_MODE_LOCKED_OPEN ||
locked = isLocked();
}
public boolean isLocked() {
return (getDrawerLockMode(Gravity.LEFT) == LOCK_MODE_LOCKED_OPEN ||
getDrawerLockMode(Gravity.RIGHT) == LOCK_MODE_LOCKED_OPEN);
}