summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/BubbleTextView.java
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2015-09-30 15:33:00 -0700
committerWinson <winsonc@google.com>2015-09-30 15:44:05 -0700
commit5fbe0746dd0bc8b8ef187c616084e75e0d7c8468 (patch)
treed8109e29f6abc8e963d2ad62b9d743f72c26f83c /src/com/android/launcher3/BubbleTextView.java
parent46a06da01cded4ba355381be41455f85f85369fa (diff)
downloadandroid_packages_apps_Trebuchet-5fbe0746dd0bc8b8ef187c616084e75e0d7c8468.tar.gz
android_packages_apps_Trebuchet-5fbe0746dd0bc8b8ef187c616084e75e0d7c8468.tar.bz2
android_packages_apps_Trebuchet-5fbe0746dd0bc8b8ef187c616084e75e0d7c8468.zip
Don’t create dummy app info.
Bug: 24539514 Change-Id: I5d14a4d9993e072451f8e7ed9a4cea219ae5d246
Diffstat (limited to 'src/com/android/launcher3/BubbleTextView.java')
-rw-r--r--src/com/android/launcher3/BubbleTextView.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 0742b0e50..7e790c6ab 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -25,6 +25,8 @@ import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Region;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
@@ -188,6 +190,15 @@ public class BubbleTextView extends TextView
}
/**
+ * Used for measurement only, sets some dummy values on this view.
+ */
+ public void applyDummyInfo() {
+ ColorDrawable d = new ColorDrawable();
+ setIcon(mLauncher.resizeIconDrawable(d), mIconSize);
+ setText("");
+ }
+
+ /**
* Overrides the default long press timeout.
*/
public void setLongPressTimeout(int longPressTimeout) {