public class VisibleRecipientChip extends ReplacementDrawableSpan implements DrawableRecipientChip
mDrawable, sWorkPaint
Constructor and Description |
---|
VisibleRecipientChip(Drawable drawable,
RecipientEntry entry) |
Modifier and Type | Method and Description |
---|---|
void |
draw(Canvas canvas)
Draw the chip.
|
Rect |
getBounds()
Get the bounds of the chip; may be 0,0 if it is not visibly rendered.
|
long |
getContactId()
Get the id of the contact associated with this chip.
|
long |
getDataId()
Get the id of the data associated with this chip.
|
Long |
getDirectoryId()
Get the directory id of the contact associated with this chip.
|
CharSequence |
getDisplay()
Get the text displayed in the chip.
|
RecipientEntry |
getEntry()
Get associated RecipientEntry.
|
String |
getLookupKey()
Get the directory lookup key associated with this chip, or
null . |
CharSequence |
getOriginalText()
Set the text in the edittextview originally associated with this chip
before any reverse lookups.
|
CharSequence |
getValue()
Get the text value this chip represents.
|
boolean |
isSelected()
Return true if the chip is selected.
|
void |
setOriginalText(String text)
Set the text in the edittextview originally associated with this chip
before any reverse lookups.
|
void |
setSelected(boolean selected)
Set the selected state of the chip.
|
String |
toString()
Returns a string representation of the object.
|
draw, getSize, setExtraMargin
updateDrawState, updateMeasureState
getUnderlying
wrap
public VisibleRecipientChip(Drawable drawable, RecipientEntry entry)
public void setSelected(boolean selected)
public boolean isSelected()
public CharSequence getDisplay()
public CharSequence getValue()
public long getContactId()
public Long getDirectoryId()
public String getLookupKey()
null
.public long getDataId()
public RecipientEntry getEntry()
public void setOriginalText(String text)
public CharSequence getOriginalText()
public Rect getBounds()
DrawableRecipientChip
getBounds
in interface DrawableRecipientChip
getBounds
in class ReplacementDrawableSpan
public void draw(Canvas canvas)
DrawableRecipientChip
draw
in interface DrawableRecipientChip
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())