diff options
author | Joey Rizzoli <joey@cyanogenmoditalia.it> | 2016-06-10 17:53:02 +0200 |
---|---|---|
committer | LuK1337 <priv.luk@gmail.com> | 2019-10-21 21:42:08 +0200 |
commit | cca548c8290bdd72f93c6566f7b844a3f2c50686 (patch) | |
tree | a7ec422446b85c441bcb66327c8098cccdee36d8 | |
parent | 5043cf504eb964acac00a0ddf681f4f2dba6482f (diff) | |
download | android_packages_apps_Gallery2-cca548c8290bdd72f93c6566f7b844a3f2c50686.tar.gz android_packages_apps_Gallery2-cca548c8290bdd72f93c6566f7b844a3f2c50686.tar.bz2 android_packages_apps_Gallery2-cca548c8290bdd72f93c6566f7b844a3f2c50686.zip |
Gallery2: Everyone or no one
hide statusbar only when toolbar is hidden
when viewing photo / video for better ui consistency
Change-Id: I64e3a951a13a765f38df83de290d9b0d167c90f7
Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>
-rwxr-xr-x | src/com/android/gallery3d/app/PhotoPage.java | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 272f93956..76bd5db6d 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -44,7 +44,6 @@ import android.view.Window; import android.view.WindowManager; import android.widget.RelativeLayout; import android.widget.Toast; -import android.widget.Toolbar; import org.codeaurora.gallery.R; @@ -210,10 +209,6 @@ public abstract class PhotoPage extends ActivityState implements private Intent mShareIntent; - //use for saving the original height and padding of toolbar - private int originalHeight = 0; - private int originalPadding = 0; - private ThreeDButton m3DButton; private boolean bShow3DButton; private ParseGDepthTask mParseGDepthTask; @@ -969,7 +964,7 @@ public abstract class PhotoPage extends ActivityState implements mShowBars = true; mOrientationManager.unlockOrientation(); mActionBar.show(); - mActivity.getGLRoot().setLightsOutMode(true); + mActivity.getGLRoot().setLightsOutMode(false); refreshHidingMessage(); refreshBottomControlsWhenReady(); } @@ -1541,14 +1536,6 @@ public abstract class PhotoPage extends ActivityState implements public void onPause() { super.onPause(); mIsActive = false; - //restore the orginal heigh and padding of toolbar - Toolbar toolbar = mActivity.getToolbar(); - if (toolbar != null) { - ViewGroup.LayoutParams layoutParams = toolbar.getLayoutParams(); - layoutParams.height = originalHeight; - toolbar.setLayoutParams(layoutParams); - toolbar.setPadding(0, originalPadding, 0, 0); - } showFullScreen(false); DetailsHelper.pause(); @@ -1669,16 +1656,6 @@ public abstract class PhotoPage extends ActivityState implements transitionFromAlbumPageIfNeeded(); - Toolbar toolbar = mActivity.getToolbar(); - //set the new height and padding to toolbar - if (toolbar != null) { - ViewGroup.LayoutParams layoutParams = toolbar.getLayoutParams(); - originalHeight = layoutParams.height; - originalPadding = toolbar.getPaddingTop(); - layoutParams.height = originalHeight - originalPadding; - toolbar.setPadding(0, 0, 0, 0); - toolbar.setLayoutParams(layoutParams); - } mIsActive = true; setContentPane(mRootPane); @@ -1701,8 +1678,6 @@ public abstract class PhotoPage extends ActivityState implements if (!mShowBars) { mActionBar.hide(); } - //hide the status bar - mActivity.getGLRoot().setLightsOutMode(true); boolean haveImageEditor = GalleryUtils.isEditorAvailable(mActivity, "image/*"); if (haveImageEditor != mHaveImageEditor) { mHaveImageEditor = haveImageEditor; |