summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PagedViewWidget.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-09-03 17:48:37 -0700
committerWinson Chung <winsonc@google.com>2013-09-05 12:14:28 -0700
commitc58497ee619416c4949b16eb43486c11618b69e5 (patch)
treeb8bfd3ec331885a25f42c69fb41dbfd861a4763a /src/com/android/launcher3/PagedViewWidget.java
parent2d8de5845be5f49d3767b8354f0d5479a0715abe (diff)
downloadandroid_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.gz
android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.bz2
android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.zip
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
Diffstat (limited to 'src/com/android/launcher3/PagedViewWidget.java')
-rw-r--r--src/com/android/launcher3/PagedViewWidget.java13
1 files changed, 13 insertions, 0 deletions
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) {