WidgetTray UI tweak

- set fixed image view width
- fade in when widget bitmap populates
- widget dimension is next to the widget name text.
- elevation of the widgets content and the reveal view is the same

b/19897708

Change-Id: Ia656144412e7d63a491ce67ff15fb58c05d9a9d9
diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java
index 78272a8..8ba5c60 100644
--- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java
+++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java
@@ -182,8 +182,14 @@
      */
     public void startAnimationToWidgets(final boolean animated) {
         final WidgetsContainerView toView = mLauncher.getWidgetsView();
+        final Resources res = mLauncher.getResources();
         PrivateTransitionCallbacks cb = new PrivateTransitionCallbacks() {
             @Override
+            public void onRevealViewVisible(View revealView, View contentView,
+                    View allAppsButtonView) {
+                revealView.setBackground(res.getDrawable(R.drawable.quantum_panel_dark));
+            }
+            @Override
             public float getMaterialRevealViewFinalAlpha(View revealView) {
                 return 0.3f;
             }
@@ -192,8 +198,9 @@
                 return revealView.getMeasuredHeight() / 2;
             }
         };
-        startAnimationToOverlay(Workspace.State.OVERVIEW_HIDDEN, toView, toView.getContentView(),
-                toView.getRevealView(), animated, true /* hideSearchBar */, cb);
+        startAnimationToOverlay(Workspace.State.OVERVIEW_HIDDEN, toView,
+                toView.getContentView(), toView.getRevealView(), animated, true /* hideSearchBar */,
+                cb);
     }
 
     /**
@@ -386,7 +393,6 @@
                     mStateAnimation.start();
                 }
             };
-
             toView.bringToFront();
             toView.setVisibility(View.VISIBLE);
             toView.post(startAnimRunnable);
@@ -481,9 +487,15 @@
     private void startAnimationToWorkspaceFromWidgets(final Launcher.State fromState,
               final Workspace.State toWorkspaceState, final boolean animated,
               final Runnable onCompleteRunnable) {
-        WidgetsContainerView widgetsView = mLauncher.getWidgetsView();
+        final WidgetsContainerView widgetsView = mLauncher.getWidgetsView();
+        final Resources res = mLauncher.getResources();
         PrivateTransitionCallbacks cb = new PrivateTransitionCallbacks() {
             @Override
+            public void onRevealViewVisible(View revealView, View contentView,
+                                            View allAppsButtonView) {
+                revealView.setBackground(res.getDrawable(R.drawable.quantum_panel_dark));
+            }
+            @Override
             public float getMaterialRevealViewFinalYDrift(View revealView) {
                 return revealView.getMeasuredHeight() / 2;
             }
diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java
index d10c304..1ae75c3 100644
--- a/src/com/android/launcher3/widget/WidgetCell.java
+++ b/src/com/android/launcher3/widget/WidgetCell.java
@@ -50,10 +50,7 @@
     private static final String TAG = "WidgetCell";
     private static final boolean DEBUG = false;
 
-    // Temporary preset width and height of the image to keep them aligned.
-    //private static final int PRESET_PREVIEW_HEIGHT = 480;
-    //private static final int PRESET_PREVIEW_WIDTH = 480;
-
+    private static final int FADE_IN_DURATION_MS = 70;
     private int mPresetPreviewSize;
 
     private static WidgetCell sShortpressTarget = null;
@@ -210,7 +207,8 @@
                         mOriginalImagePadding.right,
                         mOriginalImagePadding.bottom);
             }
-            image.setAlpha(1f);
+            image.setAlpha(0f);
+            image.animate().alpha(1.0f).setDuration(FADE_IN_DURATION_MS);
             image.mAllowRequestLayout = true;
             image.requestLayout();
         }
diff --git a/src/com/android/launcher3/widget/WidgetsContainerView.java b/src/com/android/launcher3/widget/WidgetsContainerView.java
index 5aa80a9..292a5de 100644
--- a/src/com/android/launcher3/widget/WidgetsContainerView.java
+++ b/src/com/android/launcher3/widget/WidgetsContainerView.java
@@ -126,7 +126,7 @@
     //
 
     public View getContentView() {
-        return findViewById(R.id.widgets_list_view);
+        return findViewById(R.id.widgets_content);
     }
 
     public View getRevealView() {