updateBadgeCoordinates

open fun updateBadgeCoordinates(@NonNull anchorView: View)

Calculates and updates this badge's center coordinates based on its anchor's bounds. Internally also updates this BadgeDrawable BadgeDrawable's bounds, because they are dependent on the center coordinates.

Parameters

anchorView

This badge's anchor.


open fun updateBadgeCoordinates(@NonNull anchorView: View, @Nullable customBadgeParent: FrameLayout)

Calculates and updates this badge's center coordinates based on its anchor's bounds. Internally also updates this BadgeDrawable BadgeDrawable's bounds, because they are dependent on the center coordinates.

Parameters

anchorView

This badge's anchor.

customBadgeParent

An optional parent view that will set this BadgeDrawable as its foreground.


open fun updateBadgeCoordinates(@NonNull anchorView: View, @Nullable customBadgeParent: ViewGroup)

Deprecated

use updateBadgeCoordinates instead.

Calculates and updates this badge's center coordinates based on its anchor's bounds. Internally also updates this BadgeDrawable BadgeDrawable's bounds, because they are dependent on the center coordinates. For pre API-18, coordinates will be calculated relative to customBadgeParent because the BadgeDrawable will be set as the parent's foreground.

Parameters

anchorView

This badge's anchor.

customBadgeParent

An optional parent view that will set this BadgeDrawable as its foreground.