From: David A. Velasco Date: Wed, 3 Jun 2015 09:05:10 +0000 (+0200) Subject: Disable navigation drawer in gallery view when system bars are not visible X-Git-Tag: oc-android-1.7.2~1^2~23^2~16 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/6779b77f3bd40715f41f78240204631759386965 Disable navigation drawer in gallery view when system bars are not visible --- diff --git a/src/com/owncloud/android/ui/preview/PreviewImageActivity.java b/src/com/owncloud/android/ui/preview/PreviewImageActivity.java index 21240894..6ddaf97e 100644 --- a/src/com/owncloud/android/ui/preview/PreviewImageActivity.java +++ b/src/com/owncloud/android/ui/preview/PreviewImageActivity.java @@ -8,7 +8,7 @@ * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * - * This program is distributed in the hope that it will be useful, + * This program is distributed in the hd that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -32,6 +32,7 @@ import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.support.v4.view.ViewPager; +import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBar; import android.view.MenuItem; import android.view.View; @@ -120,8 +121,10 @@ public class PreviewImageActivity extends FileActivity implements ActionBar actionBar = getSupportActionBar(); if (visible) { actionBar.show(); + mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED); } else { actionBar.hide(); + mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); } } }); @@ -496,6 +499,7 @@ public class PreviewImageActivity extends FileActivity implements if (visible) { hideSystemUI(mFullScreenAnchorView); + mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); // actionBar.hide(); // propagated through // OnSystemUiVisibilityChangeListener() } else { @@ -509,9 +513,11 @@ public class PreviewImageActivity extends FileActivity implements ActionBar actionBar = getSupportActionBar(); if (!actionBar.isShowing()) { actionBar.show(); + mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED); } else { actionBar.hide(); + mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); }