diff options
author | nebkat <nebkat@teamhacksung.org> | 2012-12-23 11:57:11 +0000 |
---|---|---|
committer | nebkat <nebkat@teamhacksung.org> | 2012-12-23 12:16:02 +0000 |
commit | 10a908a32cab20d5fc0ee944a3b34b98a9648f68 (patch) | |
tree | e0780a7b9dc7ed2dc36719ff538955fb1c0c4b48 /src/com/cyanogenmod/trebuchet/BubbleTextView.java | |
parent | a8d6d217e05240f4108227c0f19f3a9bfd1fc73a (diff) | |
download | android_packages_apps_Trebuchet-10a908a32cab20d5fc0ee944a3b34b98a9648f68.tar.gz android_packages_apps_Trebuchet-10a908a32cab20d5fc0ee944a3b34b98a9648f68.tar.bz2 android_packages_apps_Trebuchet-10a908a32cab20d5fc0ee944a3b34b98a9648f68.zip |
Workspace: Shortcut renaming
Change-Id: I67e7441b3d6ba4eba70936c2fbdc9d854b706948
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/BubbleTextView.java')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/BubbleTextView.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/trebuchet/BubbleTextView.java b/src/com/cyanogenmod/trebuchet/BubbleTextView.java index 739440bdc..4c94bc97b 100644 --- a/src/com/cyanogenmod/trebuchet/BubbleTextView.java +++ b/src/com/cyanogenmod/trebuchet/BubbleTextView.java @@ -33,7 +33,7 @@ import android.widget.TextView; * because we want to make the bubble taller than the text and TextView's clip is * too aggressive. */ -public class BubbleTextView extends TextView { +public class BubbleTextView extends TextView implements ShortcutInfo.ShortcutListener { static final float CORNER_RADIUS = 4.0f; static final float SHADOW_LARGE_RADIUS = 4.0f; static final float SHADOW_SMALL_RADIUS = 1.75f; @@ -98,6 +98,7 @@ public class BubbleTextView extends TextView { null, null); setText(info.title); setTag(info); + info.setListener(this); } @Override @@ -161,6 +162,15 @@ public class BubbleTextView extends TextView { super.drawableStateChanged(); } + @Override + public void onTitleChanged(CharSequence title) { + if (mTextVisible) { + setText(title); + } else { + mVisibleText = title; + } + } + /** * Draw this BubbleTextView into the given Canvas. * |