summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java3
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageShow.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 7b4ae6691..02acaeab1 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -457,6 +457,9 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
int accessoryPanelWidth = viewPanel.getWidth();
int mainViewWidth = findViewById(R.id.mainView).getWidth();
int mainPanelWidth = mImageShow.getDisplayedImageBounds().width();
+ if (mainPanelWidth == 0) {
+ mainPanelWidth = mainViewWidth;
+ }
int leftOver = mainViewWidth - mainPanelWidth - accessoryPanelWidth;
if (leftOver < 0) {
return -accessoryPanelWidth;
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
index bf22c891f..c113e5d92 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
@@ -83,7 +83,7 @@ public class ImageShow extends View implements OnGestureListener,
private HistoryAdapter mHistoryAdapter = null;
private ImageStateAdapter mImageStateAdapter = null;
- private Rect mImageBounds = null;
+ private Rect mImageBounds = new Rect();
private boolean mTouchShowOriginal = false;
private long mTouchShowOriginalDate = 0;