Skip to content

Badge layout

Version 0.5.3

BadgeLayout provides BadgeView and AppCompatImageView by default, where the logo will be displayed in the upper right corner and the icon will be displayed horizontally in the center.

BadgeLayout

BadgeLayout

Label

Version 0.5.3

BadgeLayout is only allowed to contain a view of type TextView to display labels. The following is sample code:

<com.ave.vastgui.tools.view.badgeview.BadgeLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:badge_mode="number">

    <com.google.android.material.textview.MaterialTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Number Bubble" />

</com.ave.vastgui.tools.view.badgeview.BadgeLayout>

Dot badge

Version 0.5.3

Calling showDot or hideDot to control dot badge.

// Show badge
mBinding.dotbadge.showDot()
// Hide badge
mBinding.dotbadge.hideDot()

Bubble badge

Version 0.5.3

Bubble Badge

气泡徽标动画

Sample code

Sample code