Fix history panel first appearance

Change-Id: I49c3f91d1d65cc64b15080c64709f769fc8a8f22
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index d4ecf80..ff6e466 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -548,6 +548,12 @@
 
     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) {