From 3ec8bdd576e23f6aa783d5377abecac6fda07374 Mon Sep 17 00:00:00 2001 From: Patrick Dubroy Date: Fri, 6 Aug 2010 16:01:33 -0700 Subject: Refactor zooming animation, and apply it to customize drawer too. Change-Id: I0bbd5a68adc82cea02dc583ac3d04e3de8c0346e --- src/com/android/launcher2/AllAppsTabbed.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/com/android/launcher2/AllAppsTabbed.java') diff --git a/src/com/android/launcher2/AllAppsTabbed.java b/src/com/android/launcher2/AllAppsTabbed.java index 3aa70f4..7dbb1a5 100644 --- a/src/com/android/launcher2/AllAppsTabbed.java +++ b/src/com/android/launcher2/AllAppsTabbed.java @@ -92,10 +92,6 @@ public class AllAppsTabbed extends TabHost implements AllAppsView { }); setCurrentTab(0); - - // It needs to be INVISIBLE so that it will be measured in the layout. - // Otherwise the animations is messed up when we show it for the first time. - setVisibility(INVISIBLE); } @Override @@ -113,8 +109,13 @@ public class AllAppsTabbed extends TabHost implements AllAppsView { // NOTE: animate parameter is ignored for the TabHost itself setVisibility((zoom == 0.0f) ? View.GONE : View.VISIBLE); mAllApps2D.zoom(zoom, animate); - bringChildToFront((View)mAllApps2D); - getParent().bringChildToFront(this); + } + + @Override + public void setVisibility(int visibility) { + super.setVisibility(visibility); + float zoom = visibility == View.VISIBLE ? 1.0f : 0.0f; + mAllApps2D.zoom(zoom, false); } @Override -- cgit v1.1