diff options
| author | Bobby Georgescu <georgescu@google.com> | 2012-10-06 15:22:03 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-06 18:25:33 -0700 |
| commit | ce1c4052595995ccd7efe87fcff4d2c7c503f7ac (patch) | |
| tree | 932b01037be4e48d59660cf7802dcca6f69cd8b6 /src | |
| parent | 86bc3a20a94d744e44a53bc5b277dbb5cbca0073 (diff) | |
| download | android_packages_apps_Snap-ce1c4052595995ccd7efe87fcff4d2c7c503f7ac.tar.gz android_packages_apps_Snap-ce1c4052595995ccd7efe87fcff4d2c7c503f7ac.tar.bz2 android_packages_apps_Snap-ce1c4052595995ccd7efe87fcff4d2c7c503f7ac.zip | |
Change display of 360 panorama button
Bug: 7300866
-Move pano button to center and make larger
-Pano button visible even when in full-screen mode
-Show edit button only when image editor is available
-Correctly hide bottom controls when switching from
filmstrip mode to grid mode
Change-Id: I485b1988733bedd0c03e89a261a6ce80be46b9bc
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index a219f51e4..cd8b80259 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -507,14 +507,18 @@ public class PhotoPage extends ActivityState implements } public boolean canDisplayBottomControls() { - return mShowBars && !mPhotoView.getFilmMode(); + return mIsActive && !mPhotoView.getFilmMode(); } public boolean canDisplayBottomControl(int control) { if (mCurrentPhoto == null) return false; switch(control) { case R.id.photopage_bottom_control_edit: - return mCurrentPhoto.getMediaType() == MediaObject.MEDIA_TYPE_IMAGE; + return mHaveImageEditor && mShowBars + && (mCurrentPhoto.getSupportedOperations() + & MediaItem.SUPPORT_EDIT) != 0 + && mCurrentPhoto.getMediaType() + == MediaObject.MEDIA_TYPE_IMAGE; case R.id.photopage_bottom_control_panorama: return (mCurrentPhoto.getSupportedOperations() & MediaItem.SUPPORT_PANORAMA) != 0; @@ -1189,6 +1193,10 @@ public class PhotoPage extends ActivityState implements } mPhotoView.pause(); mHandler.removeMessages(MSG_HIDE_BARS); + mHandler.removeMessages(MSG_REFRESH_BOTTOM_CONTROLS); + if (mBottomControls != null) { + mBottomControls.refresh(); + } mActionBar.removeOnMenuVisibilityListener(mMenuVisibilityListener); if (mShowSpinner) { mActionBar.disableAlbumModeMenu(true); @@ -1275,6 +1283,9 @@ public class PhotoPage extends ActivityState implements mActionBar.setDisplayOptions( ((mSecureAlbum == null) && (mSetPathString != null)), false); mActionBar.addOnMenuVisibilityListener(mMenuVisibilityListener); + if (mBottomControls != null) { + mBottomControls.refresh(); + } if (mShowSpinner) { mActionBar.enableAlbumModeMenu( GalleryActionBar.ALBUM_FILMSTRIP_MODE_SELECTED, this); |
