From c58497ee619416c4949b16eb43486c11618b69e5 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 3 Sep 2013 17:48:37 -0700 Subject: Initial changes to restore AllApps. - Removes unused all apps code due to dynamic grid/spacing - Attempts to use CellLayout instead of PagedViewCellLayout Change-Id: I3c49bca9fc35dfeaf250591fd63bc7f36119968f --- src/com/android/launcher3/PagedViewWidget.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/com/android/launcher3/PagedViewWidget.java') diff --git a/src/com/android/launcher3/PagedViewWidget.java b/src/com/android/launcher3/PagedViewWidget.java index 220a9f75f..45320a484 100644 --- a/src/com/android/launcher3/PagedViewWidget.java +++ b/src/com/android/launcher3/PagedViewWidget.java @@ -23,6 +23,7 @@ import android.content.pm.ResolveInfo; import android.content.res.Resources; import android.graphics.Rect; import android.util.AttributeSet; +import android.util.TypedValue; import android.view.MotionEvent; import android.view.View; import android.widget.ImageView; @@ -77,6 +78,18 @@ public class PagedViewWidget extends LinearLayout { mOriginalImagePadding.top = image.getPaddingTop(); mOriginalImagePadding.right = image.getPaddingRight(); mOriginalImagePadding.bottom = image.getPaddingBottom(); + + // Ensure we are using the right text size + LauncherAppState app = LauncherAppState.getInstance(); + DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); + TextView name = (TextView) findViewById(R.id.widget_name); + if (name != null) { + name.setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize); + } + TextView dims = (TextView) findViewById(R.id.widget_dims); + if (dims != null) { + dims.setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize); + } } public static void setDeletePreviewsWhenDetachedFromWindow(boolean value) { -- cgit v1.2.3