summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml4
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageShow.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 58c47fb0d..be6408d6b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -243,8 +243,8 @@
<activity
android:name="com.android.gallery3d.filtershow.FilterShowActivity"
android:label="@string/title_activity_filter_show"
- android:theme="@style/Theme.Gallery"
- android:screenOrientation="portrait">
+ android:theme="@style/Theme.Gallery"
+ android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.EDIT" />
<category android:name="android.intent.category.DEFAULT" />
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
index 5c476eb31..0c51f1270 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
@@ -359,7 +359,7 @@ public class ImageShow extends View implements SliderListener, OnSeekBarChangeLi
float h = w / ratio;
float ty = (getHeight() - h) / 2.0f;
float tx = 0;
- if (ratio < 1.0f) { // portrait image
+ if (ratio < 1.0f || (getHeight() < w)) {
h = getHeight();
w = h * ratio;
tx = (getWidth() - w) / 2.0f;