summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PagedViewIcon.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/PagedViewIcon.java')
-rw-r--r--src/com/android/launcher3/PagedViewIcon.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/PagedViewIcon.java b/src/com/android/launcher3/PagedViewIcon.java
index 785725852..282d794a7 100644
--- a/src/com/android/launcher3/PagedViewIcon.java
+++ b/src/com/android/launcher3/PagedViewIcon.java
@@ -64,17 +64,21 @@ public class PagedViewIcon extends TextView {
// Ensure we are using the right text size
LauncherAppState app = LauncherAppState.getInstance();
DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
- setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize);
+ setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.iconTextSizePx);
mTextColor = getCurrentTextColor();
mIsTextVisible = mTextColor != getResources().getColor(android.R.color.transparent);
}
public void applyFromApplicationInfo(AppInfo info, boolean scaleUp,
PagedViewIcon.PressedCallback cb) {
+ LauncherAppState app = LauncherAppState.getInstance();
+ DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
+
mIcon = info.iconBitmap;
mPressedCallback = cb;
setCompoundDrawables(null, Utilities.createIconDrawable(mIcon),
null, null);
+ setCompoundDrawablePadding(grid.iconDrawablePaddingPx);
setText(info.title);
setTag(info);
}