diff --git a/res/drawable/widgets_row_divider.xml b/res/drawable/widgets_row_divider.xml
new file mode 100644
index 0000000..46caacb
--- /dev/null
+++ b/res/drawable/widgets_row_divider.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" >
+    <size android:width="@dimen/widget_row_divider" />
+    <solid android:color="@color/widget_text_panel" />
+</shape>
diff --git a/res/layout/widget_cell.xml b/res/layout/widget_cell.xml
index 196dfca..a85f0aa 100644
--- a/res/layout/widget_cell.xml
+++ b/res/layout/widget_cell.xml
@@ -16,13 +16,12 @@
 <com.android.launcher3.widget.WidgetCell
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:launcher="http://schemas.android.com/apk/res-auto"
-    android:layout_width="@dimen/widget_preview_container_width"
-    android:layout_height="@dimen/widget_cell_height"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
     android:layout_weight="1"
-    android:layout_marginEnd="@dimen/widget_row_divider"
     android:orientation="vertical"
-    android:background="@color/widgets_cell_color"
     android:focusable="true"
+    android:background="@color/widgets_cell_color"
     android:gravity="center_horizontal">
 
     <LinearLayout
@@ -73,9 +72,8 @@
     <com.android.launcher3.widget.WidgetImageView
         android:id="@+id/widget_preview"
         style="@style/WidgetImageView"
-        android:layout_width="match_parent"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_weight="1"
         android:scaleType="matrix" />
-
-</com.android.launcher3.widget.WidgetCell>
+</com.android.launcher3.widget.WidgetCell>
\ No newline at end of file
diff --git a/res/layout/widgets_list_row_view.xml b/res/layout/widgets_list_row_view.xml
index 8bc8be4..2cbdb5c 100644
--- a/res/layout/widgets_list_row_view.xml
+++ b/res/layout/widgets_list_row_view.xml
@@ -48,26 +48,19 @@
         launcher:iconSizeOverride="@dimen/widget_section_icon_size"
         launcher:layoutHorizontal="true" />
 
-    <!--  Widget list -->
-    <com.android.launcher3.widget.WidgetRowView
-        android:id="@+id/widget_row"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/widget_cell_height"
-        android:layout_gravity="end"
-        android:layout_marginLeft="@dimen/widget_row_padding"
-        android:background="@color/widgets_cell_color"
-        >
-        <HorizontalScrollView
-            android:id="@+id/widgets_scroll_container"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:scrollbars="none" >
-            <LinearLayout
-                android:id="@+id/widgets_cell_list"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:background="@color/widget_text_panel"/>
-        </HorizontalScrollView>
-    </com.android.launcher3.widget.WidgetRowView>
+    <HorizontalScrollView
+        android:id="@+id/widgets_scroll_container"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:scrollbars="none" >
+        <LinearLayout
+            android:id="@+id/widgets_cell_list"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/widget_row_padding"
+            android:orientation="horizontal"
+            android:divider="@drawable/widgets_row_divider"
+            android:showDividers="middle"
+            android:background="@color/widgets_cell_color"/>
+    </HorizontalScrollView>
 </LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 6280e52..f944d4b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -101,7 +101,6 @@
 
     <!-- Equation: widget_preview_size + 2 * widget_preview_padding_horizontal -->
     <dimen name="widget_preview_container_width">146dp</dimen>
-    <dimen name="widget_cell_height">150dp</dimen>
     <dimen name="widget_row_padding">8dp</dimen>
     <dimen name="widget_row_divider">2dp</dimen>
 
diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java
index 8779371..7ca4df9 100644
--- a/src/com/android/launcher3/widget/WidgetCell.java
+++ b/src/com/android/launcher3/widget/WidgetCell.java
@@ -51,14 +51,13 @@
     private static final int FADE_IN_DURATION_MS = 90;
 
     /** Widget cell width is calculated by multiplying this factor to grid cell width. */
-    private static final float WIDTH_SCALE = 2.8f;
+    private static final float WIDTH_SCALE = 2.6f;
 
     /** Widget preview width is calculated by multiplying this factor to the widget cell width. */
-    private static final float PREVIEW_SCALE = 0.9f;
+    private static final float PREVIEW_SCALE = 0.8f;
 
-    private static int mPresetPreviewSize;
-    private static int mSize;
-    private static int mDividerWidth;
+    private int mPresetPreviewSize;
+    int cellSize;
 
     private ImageView mWidgetImage;
     private TextView mWidgetName;
@@ -93,14 +92,9 @@
     }
 
     private void setContainerWidth() {
-        // Do nothing if already set
-        if (mSize > 0) {
-            return;
-        }
         DeviceProfile profile = LauncherAppState.getInstance().getDynamicGrid().getDeviceProfile();
-        mSize = (int) (profile.cellWidthPx * WIDTH_SCALE);
+        cellSize = (int) (profile.cellWidthPx * WIDTH_SCALE);
         mPresetPreviewSize = (int) (profile.cellWidthPx * WIDTH_SCALE * PREVIEW_SCALE);
-        mDividerWidth = getResources().getDimensionPixelSize(R.dimen.widget_row_divider);
     }
 
     @Override
@@ -117,12 +111,6 @@
         mWidgetDims = ((TextView) findViewById(R.id.widget_dims));
     }
 
-    @Override
-    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        super.onMeasure(MeasureSpec.makeMeasureSpec(mSize, MeasureSpec.EXACTLY),
-                MeasureSpec.makeMeasureSpec(mSize, MeasureSpec.EXACTLY));
-    }
-
     /**
      * Called to clear the view and free attached resources. (e.g., {@link Bitmap}
      */
@@ -133,7 +121,6 @@
         mWidgetImage.setImageDrawable(null);
         mWidgetName.setText(null);
         mWidgetDims.setText(null);
-        setSeparator(true);
 
         if (mActiveRequest != null) {
             mActiveRequest.cleanup();
@@ -254,11 +241,4 @@
         }
         return "";
     }
-
-    public void setSeparator(boolean enable) {
-        LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) getLayoutParams();
-        lp.setMarginEnd(enable? mDividerWidth : 0);
-        setLayoutParams(lp);
-        requestLayout();
-    }
 }
diff --git a/src/com/android/launcher3/widget/WidgetRowView.java b/src/com/android/launcher3/widget/WidgetRowView.java
deleted file mode 100644
index 05760ae..0000000
--- a/src/com/android/launcher3/widget/WidgetRowView.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher3.widget;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.util.AttributeSet;
-import android.widget.LinearLayout;
-
-
-import com.android.launcher3.DeviceProfile;
-import com.android.launcher3.DynamicGrid;
-import com.android.launcher3.LauncherAppState;
-
-/**
- * Represents the individual cell of the widget inside the widget tray.
- */
-public class WidgetRowView extends LinearLayout {
-
-    private static final int PRESET_INDENT_SIZE_TABLET = 56;
-
-    /** Widget row width is calculated by multiplying this factor to grid cell width. */
-    private static final float HEIGHT_SCALE = 2.8f;
-
-    static int sIndent = 0;
-    static int sHeight = 0;
-
-    public WidgetRowView(Context context) {
-        this(context, null);
-    }
-
-    public WidgetRowView(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-    }
-
-    public WidgetRowView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-        setContainerHeight();
-        setWillNotDraw(false);
-        setClipToPadding(false);
-        setAccessibilityDelegate(LauncherAppState.getInstance().getAccessibilityDelegate());
-    }
-
-    /**
-     * Sets the widget cell container size based on the physical dimension of the device.
-     */
-    private void setContainerHeight() {
-        // Do nothing if already set
-        if (sHeight > 0) {
-            return;
-        }
-
-        Resources r = getResources();
-        DeviceProfile profile = LauncherAppState.getInstance().getDynamicGrid().getDeviceProfile();
-        if (profile.isLargeTablet || profile.isTablet) {
-            sIndent = DynamicGrid.pxFromDp(PRESET_INDENT_SIZE_TABLET, r.getDisplayMetrics());
-        }
-        sHeight = (int) (profile.cellWidthPx * HEIGHT_SCALE);
-    }
-}
diff --git a/src/com/android/launcher3/widget/WidgetsListAdapter.java b/src/com/android/launcher3/widget/WidgetsListAdapter.java
index d114883..d45ff1d 100644
--- a/src/com/android/launcher3/widget/WidgetsListAdapter.java
+++ b/src/com/android/launcher3/widget/WidgetsListAdapter.java
@@ -18,14 +18,19 @@
 import android.content.Context;
 import android.content.pm.ResolveInfo;
 import android.support.v7.widget.RecyclerView;
+import android.content.res.Resources;
 import android.support.v7.widget.RecyclerView.Adapter;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewGroup.LayoutParams;
 import android.widget.LinearLayout;
 
 import com.android.launcher3.BubbleTextView;
+
+import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.DynamicGrid;
 import com.android.launcher3.IconCache;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.LauncherAppState;
@@ -46,7 +51,7 @@
 public class WidgetsListAdapter extends Adapter<WidgetsRowViewHolder> {
 
     private static final String TAG = "WidgetsListAdapter";
-    private static final boolean DEBUG = false;
+    private static final boolean DEBUG = true;
 
     private Context mContext;
     private Launcher mLauncher;
@@ -59,6 +64,9 @@
     private View.OnClickListener mIconClickListener;
     private View.OnLongClickListener mIconLongClickListener;
 
+    private static final int PRESET_INDENT_SIZE_TABLET = 56;
+    private int mIndent = 0;
+
     public WidgetsListAdapter(Context context,
             View.OnClickListener iconClickListener,
             View.OnLongClickListener iconLongClickListener,
@@ -71,6 +79,8 @@
 
         mLauncher = launcher;
         mIconCache = LauncherAppState.getInstance().getIconCache();
+
+        setContainerHeight();
     }
 
     public void setWidgetsModel(WidgetsModel w) {
@@ -96,6 +106,7 @@
         // Add more views.
         // if there are too many, hide them.
         int diff = infoList.size() - row.getChildCount();
+
         if (diff > 0) {
             for (int i = 0; i < diff; i++) {
                 WidgetCell widget = new WidgetCell(mContext);
@@ -105,10 +116,11 @@
                 // set up touch.
                 widget.setOnClickListener(mIconClickListener);
                 widget.setOnLongClickListener(mIconLongClickListener);
-                // Add a devider if it is not the last item.
-                if (i == diff - 1) {
-                   widget.setSeparator(false);
-                }
+                LayoutParams lp = widget.getLayoutParams();
+                lp.height = widget.cellSize;
+                lp.width = widget.cellSize;
+                widget.setLayoutParams(lp);
+
                 row.addView(widget);
             }
         } else if (diff < 0) {
@@ -152,11 +164,10 @@
 
         ViewGroup container = (ViewGroup) mLayoutInflater.inflate(
                 R.layout.widgets_list_row_view, parent, false);
-        WidgetRowView row = (WidgetRowView) container.findViewById(R.id.widget_row);
-        LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) row.getLayoutParams();
-        lp.setMarginStart(WidgetRowView.sIndent);
-        lp.height = WidgetRowView.sHeight;
-        row.setLayoutParams(lp);
+        View cellList = container.findViewById(R.id.widgets_cell_list);
+        LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) cellList.getLayoutParams();
+        lp.setMarginStart(mIndent);
+
         return new WidgetsRowViewHolder(container);
     }
 
@@ -181,4 +192,12 @@
         }
         return mWidgetPreviewLoader;
     }
+
+    private void setContainerHeight() {
+        Resources r = mContext.getResources();
+        DeviceProfile profile = LauncherAppState.getInstance().getDynamicGrid().getDeviceProfile();
+        if (profile.isLargeTablet || profile.isTablet) {
+            mIndent = DynamicGrid.pxFromDp(PRESET_INDENT_SIZE_TABLET, r.getDisplayMetrics());
+        }
+    }
 }
