AndroidBadgeButton

Additional

Language
Java
Version
1.0.2 (Jan 12, 2019)
Created
Jan 9, 2019
Updated
Jan 13, 2019
Owner
Mojtaba shafaei (Mojtaba-Shafaei)
Contributor
Mojtaba shafaei (Mojtaba-Shafaei)
1
Activity
Badge
Generate
Download
Source code
APK file

Advertising

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 setBadgeDrawable(Drawable drawable)
  • public void setBadgeImageResource(@DrawableRes int idRes)
  • public void setBadgeImageBitmap(Bitmap bitmap)

Xml attributes

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

Installation