public class AtakLayerDrawableUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
addLayerDrawableBroadcastString(java.lang.String broadcastString) |
void |
dispose() |
android.graphics.drawable.LayerDrawable |
getBadgeableIcon(android.graphics.drawable.Drawable d)
Turns a normal drawable into a badgeable icon.
|
int |
getBadgeInt(java.lang.String iconPath) |
static AtakLayerDrawableUtil |
getInstance(android.content.Context context) |
void |
setBadgeCount(android.graphics.drawable.LayerDrawable icon,
android.graphics.drawable.Drawable baseDrawable,
int count,
java.lang.Integer color)
Set the badge count on a LayerDrawable that has been built from getBadgeableIcon.
|
void |
setBadgeCount(android.graphics.drawable.LayerDrawable icon,
android.graphics.drawable.Drawable baseDrawable,
int count,
java.lang.Integer presenceColor,
java.lang.Float textSize)
Sets the icons count given a base drawable and a presence color.
|
void |
setBadgeCount(android.graphics.drawable.LayerDrawable icon,
int count)
Set the badge count on a LayerDrawable that has been built from getBadgeableIcon.
|
void |
setBadgeCount(android.graphics.drawable.LayerDrawable icon,
int count,
java.lang.Integer color)
Set the badge count on a LayerDrawable that has been built from getBadgeableIcon.
|
public static AtakLayerDrawableUtil getInstance(android.content.Context context)
public void dispose()
public void addLayerDrawableBroadcastString(java.lang.String broadcastString)
public int getBadgeInt(java.lang.String iconPath)
public android.graphics.drawable.LayerDrawable getBadgeableIcon(android.graphics.drawable.Drawable d)
d - the normal drawablepublic void setBadgeCount(android.graphics.drawable.LayerDrawable icon,
int count)
icon - the layer drawable built from getBadgeableIconcount - the count.public void setBadgeCount(android.graphics.drawable.LayerDrawable icon,
int count,
java.lang.Integer color)
icon - the layer drawable built from getBadgeableIconcount - the count.color - the presence color.public void setBadgeCount(android.graphics.drawable.LayerDrawable icon,
android.graphics.drawable.Drawable baseDrawable,
int count,
java.lang.Integer color)
icon - the layer drawable built from getBadgeableIconbaseDrawable - the base icon.count - the count.color - the presence color.public void setBadgeCount(android.graphics.drawable.LayerDrawable icon,
android.graphics.drawable.Drawable baseDrawable,
int count,
java.lang.Integer presenceColor,
java.lang.Float textSize)
icon - the icon to set the count onbaseDrawable - the base drawable to use for the graphic, can be null to retain the base
graphic.count - the countpresenceColor - the presence color, can be null. If null the default of red is used.textSize - the size of the text, can be null. If null, the default size is used.