diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 8391b91..9f9c6f9 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -376,19 +376,19 @@
 
         if (inv.folderStyle != INVALID_RESOURCE_HANDLE) {
             TypedArray folderStyle = context.obtainStyledAttributes(inv.folderStyle,
-                    R.styleable.FolderDisplayStyle);
+                    R.styleable.FolderStyle);
             // These are re-set in #updateFolderCellSize if the grid is not scalable
             folderCellHeightPx = folderStyle.getDimensionPixelSize(
-                    R.styleable.FolderDisplayStyle_folderCellHeight, 0);
+                    R.styleable.FolderStyle_folderCellHeight, 0);
             folderCellWidthPx = folderStyle.getDimensionPixelSize(
-                    R.styleable.FolderDisplayStyle_folderCellWidth, 0);
+                    R.styleable.FolderStyle_folderCellWidth, 0);
 
             folderContentPaddingTop = folderStyle.getDimensionPixelSize(
-                    R.styleable.FolderDisplayStyle_folderTopPadding, 0);
+                    R.styleable.FolderStyle_folderTopPadding, 0);
             folderCellLayoutBorderSpacePx = folderStyle.getDimensionPixelSize(
-                    R.styleable.FolderDisplayStyle_folderBorderSpace, 0);
+                    R.styleable.FolderStyle_folderBorderSpace, 0);
             folderFooterHeightPx = folderStyle.getDimensionPixelSize(
-                    R.styleable.FolderDisplayStyle_folderFooterHeight, 0);
+                    R.styleable.FolderStyle_folderFooterHeight, 0);
             folderStyle.recycle();
         } else {
             folderCellLayoutBorderSpacePx = 0;
@@ -407,8 +407,17 @@
         mWorkspacePageIndicatorOverlapWorkspace =
                 res.getDimensionPixelSize(R.dimen.workspace_page_indicator_overlap_workspace);
 
-        iconDrawablePaddingOriginalPx =
-                res.getDimensionPixelSize(R.dimen.dynamic_grid_icon_drawable_padding);
+        TypedArray cellStyle;
+        if (inv.cellStyle != INVALID_RESOURCE_HANDLE) {
+            cellStyle = context.obtainStyledAttributes(inv.cellStyle,
+                    R.styleable.CellStyle);
+        } else {
+            cellStyle = context.obtainStyledAttributes(R.style.CellStyleDefault,
+                    R.styleable.CellStyle);
+        }
+        iconDrawablePaddingOriginalPx = cellStyle.getDimensionPixelSize(
+                R.styleable.CellStyle_iconDrawablePadding, 0);
+        cellStyle.recycle();
 
         dropTargetBarSizePx = res.getDimensionPixelSize(R.dimen.dynamic_grid_drop_target_size);
         dropTargetBarTopMarginPx = res.getDimensionPixelSize(R.dimen.drop_target_top_margin);
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index ffe81ad..d97eac9 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -143,6 +143,8 @@
 
     public @StyleRes int folderStyle;
 
+    public @StyleRes int cellStyle;
+
     public float[] horizontalMargin;
 
     public PointF[] allAppsCellSize;
@@ -349,6 +351,8 @@
         numFolderColumns = closestProfile.numFolderColumns;
         folderStyle = closestProfile.folderStyle;
 
+        cellStyle = closestProfile.cellStyle;
+
         isScalable = closestProfile.isScalable;
         devicePaddingId = closestProfile.devicePaddingId;
         this.deviceType = deviceType;
@@ -783,6 +787,7 @@
         private final int numFolderRows;
         private final int numFolderColumns;
         private final @StyleRes int folderStyle;
+        private final @StyleRes int cellStyle;
 
         private final int numAllAppsColumns;
         private final int numDatabaseAllAppsColumns;
@@ -852,6 +857,9 @@
             folderStyle = a.getResourceId(R.styleable.GridDisplayOption_folderStyle,
                     INVALID_RESOURCE_HANDLE);
 
+            cellStyle = a.getResourceId(R.styleable.GridDisplayOption_cellStyle,
+                    R.style.CellStyleDefault);
+
             isScalable = a.getBoolean(
                     R.styleable.GridDisplayOption_isScalable, false);
             devicePaddingId = a.getResourceId(
