From 40190f6917a127e156af72f72bfac9814de61ba8 Mon Sep 17 00:00:00 2001 From: nicolasroard Date: Tue, 9 Apr 2013 08:18:18 -0700 Subject: Fix history panel first appearance Change-Id: I49c3f91d1d65cc64b15080c64709f769fc8a8f22 --- src/com/android/gallery3d/filtershow/FilterShowActivity.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/com/android/gallery3d/filtershow/FilterShowActivity.java') 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) { -- cgit v1.2.3