summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/CachedTextView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/CachedTextView.java')
-rw-r--r--src/com/android/launcher2/CachedTextView.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/launcher2/CachedTextView.java b/src/com/android/launcher2/CachedTextView.java
index eaa6636e6..403d856c0 100644
--- a/src/com/android/launcher2/CachedTextView.java
+++ b/src/com/android/launcher2/CachedTextView.java
@@ -47,6 +47,7 @@ public class CachedTextView extends TextView {
private float mPaddingH = 0;
private float mPaddingV = 0;
private CharSequence mText;
+ private boolean mEnabled = true;
public CachedTextView(Context context) {
super(context);
@@ -73,6 +74,10 @@ public class CachedTextView extends TextView {
return 0;
}
+ public void disableCache() {
+ mEnabled = false;
+ }
+
public void setText(CharSequence text, BufferType type) {
super.setText(text, type);
mIsTextCacheDirty = true;
@@ -138,7 +143,7 @@ public class CachedTextView extends TextView {
}
public void draw(Canvas canvas) {
- if (mIsTextCacheDirty && !mIsBuildingCache) {
+ if (mEnabled && mIsTextCacheDirty && !mIsBuildingCache) {
buildAndUpdateCache();
mIsTextCacheDirty = false;
}