diff options
| author | Bobby Georgescu <georgescu@google.com> | 2012-10-07 12:16:58 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-07 12:16:58 -0700 |
| commit | 2ef8ad4261d7568b29eff5dad372910111a5a5d8 (patch) | |
| tree | 1d0e955e48a094264cd11cebaf9e18dace38581e | |
| parent | 85a50b2b7c49e2cbfcd575be5420ecb456c19fea (diff) | |
| parent | 4de36129b57e3a5308c109a407ea17b4fa103fe4 (diff) | |
| download | android_packages_apps_Gallery2-2ef8ad4261d7568b29eff5dad372910111a5a5d8.tar.gz android_packages_apps_Gallery2-2ef8ad4261d7568b29eff5dad372910111a5a5d8.tar.bz2 android_packages_apps_Gallery2-2ef8ad4261d7568b29eff5dad372910111a5a5d8.zip | |
am 4de36129: Merge "Change display of 360 panorama button" into gb-ub-photos-arches
* commit '4de36129b57e3a5308c109a407ea17b4fa103fe4':
Change display of 360 panorama button
| -rw-r--r-- | res/layout/photopage_bottom_controls.xml | 15 | ||||
| -rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 15 |
2 files changed, 19 insertions, 11 deletions
diff --git a/res/layout/photopage_bottom_controls.xml b/res/layout/photopage_bottom_controls.xml index 5b80cf2da..434c59824 100644 --- a/res/layout/photopage_bottom_controls.xml +++ b/res/layout/photopage_bottom_controls.xml @@ -15,21 +15,18 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentBottom="true" android:paddingTop="5dp" android:paddingBottom="5dp" android:paddingLeft="15dp" android:paddingRight="15dp" android:visibility="gone"/> - <ImageButton + <ImageView android:id="@+id/photopage_bottom_control_panorama" android:src="@drawable/ic_menu_photosphere" - android:background="@drawable/photopage_bottom_button_background" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:paddingTop="5dp" - android:paddingBottom="5dp" - android:paddingLeft="15dp" - android:paddingRight="15dp" + android:layout_width="70dp" + android:layout_height="70dp" + android:layout_centerHorizontal="true" + android:layout_alignParentBottom="true" android:visibility="gone"/> </RelativeLayout> 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); |
