summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/FilterShowActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/filtershow/FilterShowActivity.java')
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index d4ecf8063..ff6e46635 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -548,6 +548,12 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
private int translateMainPanel(View viewPanel) {
int accessoryPanelWidth = viewPanel.getWidth();
+ if (accessoryPanelWidth == 0) {
+ // TODO: fixes this by using a fragment. Currently,
+ // the first time we get called the panel hasn't been
+ // layed out yet, so we get a size zero.
+ accessoryPanelWidth = (int) getPixelsFromDip(200);
+ }
int mainViewWidth = findViewById(R.id.mainView).getWidth();
int mainPanelWidth = mImageShow.getDisplayedImageBounds().width();
if (mainPanelWidth == 0) {