summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-28 12:41:44 -0700
committerYorke Lee <yorkelee@google.com>2014-04-28 13:57:04 -0700
commita702ccdf9f067c0604a0ca571dca5c4a2a291040 (patch)
tree25576737cd77c4d0d1c321b06180b22b202bd3c9 /core/java
parent80c1210e5978aee112285b4c506c4cf326718daa (diff)
Add setOverlay method to QuickContactsBadge
Allow apps to disable/configure their own overlay to be used on the QuickContactsBadge Bug: 13747208 Change-Id: Id84c6ee1ebde6ce17477c12d22522ca19c27ea9b
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/widget/QuickContactBadge.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/widget/QuickContactBadge.java b/core/java/android/widget/QuickContactBadge.java
index 74b41c9611ed..0c31496494ed 100644
--- a/core/java/android/widget/QuickContactBadge.java
+++ b/core/java/android/widget/QuickContactBadge.java
@@ -256,6 +256,16 @@ public class QuickContactBadge extends ImageView implements OnClickListener {
}
}
+ /**
+ * Assigns the drawable that is to be drawn on top of the assigned contact photo.
+ *
+ * @param overlay Drawable to be drawn over the assigned contact photo. Must have a non-zero
+ * instrinsic width and height.
+ */
+ public void setOverlay(Drawable overlay) {
+ mOverlay = overlay;
+ }
+
private void onContactUriChanged() {
setEnabled(isAssigned());
}