Badge
@CarProtocol
@ExperimentalCarApi
public class Badge
Represents a badge that can be displayed as an overlay on top of an image.
A badge denotes some sort of call to action, notification, alert, etc. An example is badging of application icons in a launcher to add a number which denotes how many active notifications that application has.
Badges may have a dot which is a colored circle appearing in a different location to the icon.
Summary
Nested types |
|---|
public final class Badge.BuilderA builder of |
Public methods |
|
|---|---|
boolean |
|
@Nullable CarColor |
This method is deprecated. use |
@Nullable CarColor |
Returns the dot color. |
@Nullable CarIcon |
getIcon()Returns the badge icon. |
@Nullable CarColor |
Returns the icon background color. |
boolean |
hasDot()Returns whether the badge has a dot. |
int |
hashCode() |
@NonNull String |
toString() |
Public methods
getBackgroundColor
public @Nullable CarColorgetBackgroundColor()
Returns the dot background color.
getIconBackgroundColor
public @Nullable CarColor getIconBackgroundColor()
Returns the icon background color.