summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/PhotoPage.java
diff options
context:
space:
mode:
authorhuiyan <huiyan@codeaurora.org>2016-04-23 14:52:23 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-04-26 00:12:05 -0700
commit8782c246345bf7be648d740dcad66de934729294 (patch)
tree9408875aefa63ca94bfab7e0f2faf80cd0cb68b1 /src/com/android/gallery3d/app/PhotoPage.java
parent9166741f9eb6d7b337e2257b701fcf5556c88231 (diff)
downloadandroid_packages_apps_Gallery2-8782c246345bf7be648d740dcad66de934729294.tar.gz
android_packages_apps_Gallery2-8782c246345bf7be648d740dcad66de934729294.tar.bz2
android_packages_apps_Gallery2-8782c246345bf7be648d740dcad66de934729294.zip
Gallery2: Fix status bar and menu list are overlapped in photopage.
After the menu list open, the status bar is showed. So they overlapped. Set full screen in onResume state to hide status bar, and cancel full screen in onPause state to show status bar in photopage. Change-Id: I7af92a3c351b0b713126645e0270f454263356ee CRs-Fixed: 1004673
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPage.java')
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index ac89a03d1..9f7a054d8 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -41,6 +41,7 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
+import android.view.WindowManager;
import android.widget.RelativeLayout;
import android.widget.ShareActionProvider;
import android.widget.Toast;
@@ -1470,6 +1471,7 @@ public abstract class PhotoPage extends ActivityState implements
}
mActivity.getGLRoot().unfreeze();
mHandler.removeMessages(MSG_UNFREEZE_GLROOT);
+ showFullScreen(false);
DetailsHelper.pause();
// Hide the detail dialog on exit
@@ -1490,6 +1492,19 @@ public abstract class PhotoPage extends ActivityState implements
if (mMediaSet != null) mMediaSet.clearDeletion();
}
+ private void showFullScreen(boolean show) {
+ Window win = mActivity.getWindow();
+ WindowManager.LayoutParams winParams = win.getAttributes();
+ if (show) {
+ //set full screen
+ winParams.flags |= (WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ } else {
+ //cancel full screen
+ winParams.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ }
+ win.setAttributes(winParams);
+ }
+
@Override
public void onCurrentImageUpdated() {
mActivity.getGLRoot().unfreeze();
@@ -1580,6 +1595,9 @@ public abstract class PhotoPage extends ActivityState implements
mActivity.getStateManager().finishState(this);
return;
}
+ //set full screen to hide the status bar
+ showFullScreen(true);
+
transitionFromAlbumPageIfNeeded();
mActivity.getGLRoot().freeze();