Badges - Image with customizable notifier, with a badge or text applied.

Badges
Image with customizable notifier, with a badge or text applied.

In the aia project you can see how it works dynamically.


CreateBadge

Creates an Image with a badge or text applied. Supports custom size, radius and color.

Position options: TopRight, TopLeft, BottomRight, BottomLeft

Note!

  • Only images from assets can be used.

BadgeText

Dynamically changes the badge text.

blocks - 2025-04-09T002824.264

You can use integers or strings.


BadgeTextColor

Dynamically changes the badge text color. Accepts both hex strings and integer colors.

blocks - 2025-04-09T002742.965


BadgeBackgroundColor

Dynamically changes the badge background color. Accepts both hex strings and integer colors.


GetBadgeText

Returns the current text of the badge. Returns empty string if not found or not using text badge.

blocks - 2025-04-09T002655.814


MakeBadgeClickable

Makes the badge clickable and triggers BadgeClicked or BadgeLongClicked when pressed.


BadgeClicked

Triggered when a badge is clicked. Returns the ID and badge text.

component_event (46)


BadgeLongClicked

Triggered when a badge is long-clicked. Returns the ID and badge text.

component_event (47)


v1.0 April 09, 2025.

Badges.aia (41.3 KB)

joejsanz.joedevbadges.aix (14.9 KB)


JDK: 11
Minimum API Level: 21
Updated On: 2025-04-09T07:00:00Z

Built using: FAST-CLI v2.8.3


Thanks.

3 Likes

Very useful extension but how can we remove a previously created badge?
Nico

Thanks nico.

  • Are you referring to the entire icon and the small badge?

    • There isn't any method at the moment.
      Do you think it's necessary?

    • To create the function.

  • Or just the badge where text or numbers are entered?

    • In the latter, you can set the text color and background to transparent.

I do think it might be useful to be able to delete everything, but don't worry! It might be enough to hide the arrangement where the image is located!

1 Like