summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-09-03 16:36:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-03 16:36:53 +0000
commitcac4cedc989b53fdf6b8b46363b3e722c5605cff (patch)
tree0d368882f4ccc8b34eca5bdd81b2ef40e6592d15 /src/com/android/gallery3d/app
parent417f074dbcf07843bf02e762c2fe3b23fe8af32b (diff)
parent02f459f8e1ef6d6765c9a57ee1866fc5af2f9eb5 (diff)
downloadandroid_packages_apps_Gallery2-cac4cedc989b53fdf6b8b46363b3e722c5605cff.tar.gz
android_packages_apps_Gallery2-cac4cedc989b53fdf6b8b46363b3e722c5605cff.tar.bz2
android_packages_apps_Gallery2-cac4cedc989b53fdf6b8b46363b3e722c5605cff.zip
Merge "Show the action bar and edit button when system clear full screen flag." into gb-ub-photos-carlsbad
Diffstat (limited to 'src/com/android/gallery3d/app')
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 1dacb8763..96b0a5dd8 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -35,6 +35,7 @@ import android.os.Message;
import android.os.SystemClock;
import android.view.Menu;
import android.view.MenuItem;
+import android.view.View;
import android.widget.RelativeLayout;
import android.widget.ShareActionProvider;
import android.widget.Toast;
@@ -63,6 +64,7 @@ import com.android.gallery3d.picasasource.PicasaSource;
import com.android.gallery3d.ui.DetailsHelper;
import com.android.gallery3d.ui.DetailsHelper.CloseListener;
import com.android.gallery3d.ui.DetailsHelper.DetailsSource;
+import com.android.gallery3d.ui.GLRootView;
import com.android.gallery3d.ui.GLView;
import com.android.gallery3d.ui.MenuExecutor;
import com.android.gallery3d.ui.PhotoView;
@@ -180,6 +182,8 @@ public abstract class PhotoPage extends ActivityState implements
private final MyMenuVisibilityListener mMenuVisibilityListener =
new MyMenuVisibilityListener();
+ private int mLastSystemUiVis = 0;
+
private final PanoramaSupportCallback mUpdatePanoramaMenuItemsCallback = new PanoramaSupportCallback() {
@Override
public void panoramaInfoAvailable(MediaObject mediaObject, boolean isPanorama,
@@ -542,6 +546,19 @@ public abstract class PhotoPage extends ActivityState implements
mBottomControls = new PhotoPageBottomControls(this, mActivity, galleryRoot);
}
}
+
+ ((GLRootView) mActivity.getGLRoot()).setOnSystemUiVisibilityChangeListener(
+ new View.OnSystemUiVisibilityChangeListener() {
+ @Override
+ public void onSystemUiVisibilityChange(int visibility) {
+ int diff = mLastSystemUiVis ^ visibility;
+ mLastSystemUiVis = visibility;
+ if ((diff & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0
+ && (visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
+ showBars();
+ }
+ }
+ });
}
@Override