summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-04-09 08:18:18 -0700
committernicolasroard <nicolasroard@google.com>2013-04-09 08:18:18 -0700
commit40190f6917a127e156af72f72bfac9814de61ba8 (patch)
treebe40f5965dc46a0c67e376a70b3cf569723a3910 /src
parent1d728cf75969807b607838c77d2c8418462a92d6 (diff)
downloadandroid_packages_apps_Snap-40190f6917a127e156af72f72bfac9814de61ba8.tar.gz
android_packages_apps_Snap-40190f6917a127e156af72f72bfac9814de61ba8.tar.bz2
android_packages_apps_Snap-40190f6917a127e156af72f72bfac9814de61ba8.zip
Fix history panel first appearance
Change-Id: I49c3f91d1d65cc64b15080c64709f769fc8a8f22
Diffstat (limited to 'src')
-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) {