public class ShapeBadgeItem
extends java.lang.Object
BadgeItem| Modifier and Type | Field and Description |
|---|---|
static int |
SHAPE_HEART |
static int |
SHAPE_OVAL |
static int |
SHAPE_RECTANGLE |
static int |
SHAPE_STAR_3_VERTICES |
static int |
SHAPE_STAR_4_VERTICES |
static int |
SHAPE_STAR_5_VERTICES |
static int |
SHAPE_STAR_6_VERTICES |
| Constructor and Description |
|---|
ShapeBadgeItem() |
| Modifier and Type | Method and Description |
|---|---|
T |
hide() |
T |
hide(boolean animate) |
boolean |
isHidden() |
T |
setAnimationDuration(int animationDuration) |
ShapeBadgeItem |
setEdgeMarginInDp(android.content.Context context,
int edgeMarginInDp) |
ShapeBadgeItem |
setEdgeMarginInPixels(int edgeMarginInPx) |
T |
setGravity(int gravity) |
T |
setHideOnSelect(boolean hideOnSelect) |
ShapeBadgeItem |
setShape(int shape) |
ShapeBadgeItem |
setShapeColor(int color) |
ShapeBadgeItem |
setShapeColor(java.lang.String colorCode) |
ShapeBadgeItem |
setShapeColorResource(int colorResource) |
ShapeBadgeItem |
setSizeInDp(android.content.Context context,
int heightInDp,
int widthInDp) |
ShapeBadgeItem |
setSizeInPixels(int heightInPx,
int widthInPx) |
T |
show() |
T |
show(boolean animate) |
T |
toggle() |
T |
toggle(boolean animate) |
public static final int SHAPE_OVAL
public static final int SHAPE_RECTANGLE
public static final int SHAPE_HEART
public static final int SHAPE_STAR_3_VERTICES
public static final int SHAPE_STAR_4_VERTICES
public static final int SHAPE_STAR_5_VERTICES
public static final int SHAPE_STAR_6_VERTICES
public ShapeBadgeItem setShape(int shape)
shape - new shape that needs to be drawnpublic ShapeBadgeItem setShapeColorResource(int colorResource)
colorResource - resource for background colorpublic ShapeBadgeItem setShapeColor(java.lang.String colorCode)
colorCode - color code for background colorpublic ShapeBadgeItem setShapeColor(int color)
color - background colorpublic ShapeBadgeItem setSizeInDp(android.content.Context context, int heightInDp, int widthInDp)
context - to convert dp to pixelheightInDp - dp size for height of badge itemwidthInDp - dp size for width of badge itempublic ShapeBadgeItem setSizeInPixels(int heightInPx, int widthInPx)
heightInPx - pixel size for height of badge itemwidthInPx - pixel size for width of badge itempublic ShapeBadgeItem setEdgeMarginInDp(android.content.Context context, int edgeMarginInDp)
context - to convert dp to pixeledgeMarginInDp - dp size for margin of badge itempublic ShapeBadgeItem setEdgeMarginInPixels(int edgeMarginInPx)
edgeMarginInPx - pixel size for margin of badge itempublic T setGravity(int gravity)
gravity - gravity of badge (TOP|LEFT ..etc)public T setHideOnSelect(boolean hideOnSelect)
hideOnSelect - if true hides badge on tab selectionpublic T setAnimationDuration(int animationDuration)
animationDuration - hide and show animation timepublic T toggle()
public T toggle(boolean animate)
animate - whether to animate the changepublic T show()
public T show(boolean animate)
animate - whether to animate the changepublic T hide()
public T hide(boolean animate)
animate - whether to animate the changepublic boolean isHidden()