AndroidBadgeButton

Additional

Language
Kotlin
Version
1.1.0 (Mar 18, 2019)
Created
Jan 9, 2019
Updated
Mar 18, 2019
Owner
Mojtaba shafaei (Mojtaba-Shafaei)
Contributor
Mojtaba shafaei (Mojtaba-Shafaei)
1
Activity
Badge
Generate
Download
Source code
APK file

Advertisement

AndroidToolbarBadgeButton

A customizable square button to use as toolbar button with badge number.

Methods

  • public void setBadgeNum(String text)
  • public void setBadgeBackgroundDrawable(Drawable drawable)
  • public void setBadgeBackgroundColor(int color)
  • public void setBadgeBackgroundResource(@DrawableRes int resId)
  • public void setBadgeTextColor(ColorStateList colorStateList)
  • public void setBadgeTextColor(int color)
  • public void setEnabled(boolean enabled)
  • public void setIcon(Drawable drawable)
  • public void setIcon(@DrawableRes int idRes)
  • public void setIcon(Bitmap bitmap)

Xml attributes

app:icon Drawable of button(Icon) public void setIcon(Drawable drawable)
app:badgeBackground ColorStateList, Color, or Drawable public void setBadgeBackgroundDrawable(Drawable drawable)
app:textColor ColorStateList, Color public void setBadgeTextColor(ColorStateList colorStateList)

Installation