Merge "Settings dashboard tablet fixes" into nyc-dev
diff --git a/res/layout/dashboard_category.xml b/res/layout/dashboard_category.xml
index b3500b2..7019a9c 100644
--- a/res/layout/dashboard_category.xml
+++ b/res/layout/dashboard_category.xml
@@ -21,7 +21,8 @@
     android:orientation="vertical"
     android:paddingBottom="8dip"
     android:background="@color/card_background"
-    android:importantForAccessibility="noHideDescendants">
+    android:importantForAccessibility="noHideDescendants"
+    android:elevation="@dimen/dashboard_category_elevation" >
 
     <TextView android:id="@android:id/title"
         android:layout_width="match_parent"
diff --git a/res/layout/dashboard_tile.xml b/res/layout/dashboard_tile.xml
index 983e6ea..2f87909 100644
--- a/res/layout/dashboard_tile.xml
+++ b/res/layout/dashboard_tile.xml
@@ -21,7 +21,8 @@
     android:gravity="center_vertical"
     android:minHeight="@dimen/dashboard_tile_minimum_height"
     android:clickable="true"
-    android:background="@drawable/selectable_card" >
+    android:background="@drawable/selectable_card"
+    android:elevation="@dimen/dashboard_category_elevation" >
 
     <ImageView
         android:id="@android:id/icon"
diff --git a/src/com/android/settings/dashboard/DashboardDecorator.java b/src/com/android/settings/dashboard/DashboardDecorator.java
index 2e7afaf..9bcf39d 100644
--- a/src/com/android/settings/dashboard/DashboardDecorator.java
+++ b/src/com/android/settings/dashboard/DashboardDecorator.java
@@ -21,7 +21,6 @@
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.RecyclerView.State;
 import android.support.v7.widget.RecyclerView.ViewHolder;
-import android.util.Log;
 import android.util.TypedValue;
 import android.view.View;
 import com.android.settings.R;
@@ -41,8 +40,6 @@
     @Override
     public void onDrawOver(Canvas c, RecyclerView parent, State state) {
         final int childCount = parent.getChildCount();
-        final int width = parent.getWidth();
-        final int bottom = parent.getBottom();
         for (int i = 1; i < childCount; i++) {
             final View child = parent.getChildAt(i);
             final ViewHolder holder = parent.getChildViewHolder(child);
@@ -56,7 +53,8 @@
             }
 
             int top = getChildTop(child);
-            mDivider.setBounds(0, top, width, top + mDivider.getIntrinsicHeight());
+            mDivider.setBounds(child.getLeft(), top, child.getRight(),
+                    top + mDivider.getIntrinsicHeight());
             mDivider.draw(c);
         }
     }