diff options
author | Wei-Ta Chen <weita@google.com> | 2011-10-17 15:49:27 -0700 |
---|---|---|
committer | Wei-Ta Chen <weita@google.com> | 2011-10-18 12:04:12 -0700 |
commit | 66188959498860c8b43ab7b9119c7b5c890c83dc (patch) | |
tree | ec68532411380fbfd3f9536b956d016f242456cf /src/com/android/camera/ui/SharePopup.java | |
parent | 15fd5d2622a835b6998d22474c774ea6bca15a15 (diff) | |
download | LegacyCamera-66188959498860c8b43ab7b9119c7b5c890c83dc.zip LegacyCamera-66188959498860c8b43ab7b9119c7b5c890c83dc.tar.gz LegacyCamera-66188959498860c8b43ab7b9119c7b5c890c83dc.tar.bz2 |
Fix getting an empty thumbnail in reviewing panorama.
The sample size for generating a thumbnail should be calculated in a way
that also considers the case of a portrait image, i.e., height > width.
The SharePopup should also puts the thumbnail of a portrait panorama in
the center of the thumbnail view.
Bug: 5411488
Change-Id: I5e86a91829de77f4694c039bd871e6831f3906cb
Diffstat (limited to 'src/com/android/camera/ui/SharePopup.java')
-rw-r--r-- | src/com/android/camera/ui/SharePopup.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/camera/ui/SharePopup.java b/src/com/android/camera/ui/SharePopup.java index 84bada4..3917c54 100644 --- a/src/com/android/camera/ui/SharePopup.java +++ b/src/com/android/camera/ui/SharePopup.java @@ -198,10 +198,9 @@ public class SharePopup extends PopupWindow implements View.OnClickListener, new RelativeLayout.LayoutParams(lpOld.width, lpOld.height); mRootView.setBackgroundDrawable(null); - if (mBitmapWidth > mBitmapHeight*2) { + if (mBitmapWidth > mBitmapHeight * 2 || mBitmapHeight > mBitmapWidth * 2) { // panorama image - lpNew.addRule(RelativeLayout.ALIGN_PARENT_LEFT); - lpNew.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + lpNew.addRule(RelativeLayout.CENTER_HORIZONTAL); lpNew.addRule(RelativeLayout.CENTER_VERTICAL); // panorama images block the preview from showing in the background |