From 88ded5540add466fa1130a319c183dea1a98374f Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Wed, 3 Jun 2015 13:36:09 +0200 Subject: [PATCH] Fixed home button in action bar for PreviewImageActvitiy when navigation drawer is shown --- .../owncloud/android/ui/preview/PreviewImageActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/owncloud/android/ui/preview/PreviewImageActivity.java b/src/com/owncloud/android/ui/preview/PreviewImageActivity.java index 3d36f096a4..e74e5e5f28 100644 --- a/src/com/owncloud/android/ui/preview/PreviewImageActivity.java +++ b/src/com/owncloud/android/ui/preview/PreviewImageActivity.java @@ -31,6 +31,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; +import android.support.v4.view.GravityCompat; import android.support.v4.view.ViewPager; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBar; @@ -324,7 +325,11 @@ public class PreviewImageActivity extends FileActivity implements switch(item.getItemId()){ case android.R.id.home: - backToDisplayActivity(); + if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) { + mDrawerLayout.closeDrawer(GravityCompat.START); + } else { + backToDisplayActivity(); + } returnValue = true; break; default: