Initial changes to break out AllApps into its own view.

- Moves launcher state-transition code into its own class
- Moves all-apps related code into a separate view/set of classes
- Implements a basic list view for all apps

Change-Id: I68f174aa9e1bf82c4e46ce9549c78a8dc4623f46
diff --git a/src/com/android/launcher3/AppsCustomizeTabHost.java b/src/com/android/launcher3/AppsCustomizeTabHost.java
index a271712..5e2f05c 100644
--- a/src/com/android/launcher3/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher3/AppsCustomizeTabHost.java
@@ -27,7 +27,6 @@
 public class AppsCustomizeTabHost extends FrameLayout implements LauncherTransitionable, Insettable  {
     static final String LOG_TAG = "AppsCustomizeTabHost";
 
-    private static final String APPS_TAB_TAG = "APPS";
     private static final String WIDGETS_TAB_TAG = "WIDGETS";
 
     private AppsCustomizePagedView mPagedView;
@@ -50,10 +49,6 @@
         mPagedView.setContentType(type);
     }
 
-    public void setCurrentTabFromContent(AppsCustomizePagedView.ContentType type) {
-        setContentTypeImmediate(type);
-    }
-
     @Override
     public void setInsets(Rect insets) {
         mInsets.set(insets);
@@ -79,27 +74,38 @@
     }
 
     /**
+     * Returns the content view used for the launcher transitions.
+     */
+    public View getContentView() {
+        return findViewById(R.id.apps_customize_pane_content);
+    }
+
+    /**
+     * Returns the reveal view used for the launcher transitions.
+     */
+    public View getRevealView() {
+        return findViewById(R.id.fake_page);
+    }
+
+    /**
+     * Returns the page indicators view.
+     */
+    public View getPageIndicators() {
+        return findViewById(R.id.apps_customize_page_indicator);
+    }
+
+    /**
      * Returns the content type for the specified tab tag.
      */
     public AppsCustomizePagedView.ContentType getContentTypeForTabTag(String tag) {
-        if (tag.equals(APPS_TAB_TAG)) {
-            return AppsCustomizePagedView.ContentType.Applications;
-        } else if (tag.equals(WIDGETS_TAB_TAG)) {
-            return AppsCustomizePagedView.ContentType.Widgets;
-        }
-        return AppsCustomizePagedView.ContentType.Applications;
+        return AppsCustomizePagedView.ContentType.Widgets;
     }
 
     /**
      * Returns the tab tag for a given content type.
      */
     public String getTabTagForContentType(AppsCustomizePagedView.ContentType type) {
-        if (type == AppsCustomizePagedView.ContentType.Applications) {
-            return APPS_TAB_TAG;
-        } else if (type == AppsCustomizePagedView.ContentType.Widgets) {
-            return WIDGETS_TAB_TAG;
-        }
-        return APPS_TAB_TAG;
+        return WIDGETS_TAB_TAG;
     }
 
     /**
@@ -199,6 +205,7 @@
         ViewGroup parent = (ViewGroup) getParent();
         if (parent == null) return;
 
+        View appsView = ((Launcher) getContext()).getAppsView();
         View overviewPanel = ((Launcher) getContext()).getOverviewPanel();
         final int count = parent.getChildCount();
         if (!isChildrenDrawingOrderEnabled()) {
@@ -207,7 +214,8 @@
                 if (child == this) {
                     break;
                 } else {
-                    if (child.getVisibility() == GONE || child == overviewPanel) {
+                    if (child.getVisibility() == GONE || child == overviewPanel ||
+                            child == appsView) {
                         continue;
                     }
                     child.setVisibility(visibility);