File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
src/test/java/com/minibugdev/drawablebadge Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 11# Drawable Badge
22[ ![ CircleCI] ( https://circleci.com/gh/minibugdev/DrawableBadge.svg?style=shield )] ( https://circleci.com/gh/minibugdev/DrawableBadge )
3- [ ![ Release] ( https://jitpack.io/v/minibugdev/DrawableBadge.svg )] ( https://jitpack.io/#minibugdev/DrawableBadge/2.0.0 )
3+ [ ![ Release] ( https://jitpack.io/v/minibugdev/DrawableBadge.svg )] ( https://jitpack.io/#minibugdev/DrawableBadge/2.0.1 )
44[ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://raw.githubusercontent.com/minibugdev/DrawableBadge/master/LICENSE )
55
66Drawable Badge is a android library for adding badges to drawables.
@@ -21,6 +21,7 @@ val drawable = DrawableBadge.Builder(context)
2121 .badgeBorderColor(R .color.badgeBorderColor)
2222 .badgeBorderSize(R .dimen.badge_border_size)
2323 .maximumCounter(99 )
24+ .showCounter(true )
2425 .build()
2526 .get(99 )
2627```
@@ -42,6 +43,7 @@ imageViewBadge.setImageDrawable(drawable)
4243- ` badgeBorderColor ` : Badge border color resource id , default ` #FFFFFF ` .
4344- ` badgeBorderSize ` : Badge border size supported ` @DimenRes ` or ` @Px ` , default ` 0.5dp ` .
4445- ` maximumCounter ` : Maximum counter text will append with ` + ` , default and not more than ` 99 ` .
46+ - ` showCounter ` : Set visible of badge counter number, default ` true ` .
4547
4648#### Deprecated
4749- ` badgePosition ` : Position of Badge which need to added.
@@ -54,7 +56,7 @@ repositories {
5456```
5557
5658``` groovy
57- compile 'com.github.minibugdev:drawablebadge:2.0.0 '
59+ compile 'com.github.minibugdev:drawablebadge:2.0.1 '
5860```
5961
6062
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ android {
1111 defaultConfig {
1212 minSdkVersion 14
1313 targetSdkVersion 30
14- versionCode 5
15- versionName " 2.0.0 "
14+ versionCode 6
15+ versionName " 2.0.1 "
1616 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
1717 }
1818 buildTypes {
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ class DrawableBadgeBuilderTest {
6868 .badgeGravity(Gravity .CENTER_VERTICAL or Gravity .END )
6969 .showBorder(false )
7070 .maximumCounter(50 )
71+ .showCounter(false )
7172 .build()
7273
7374 val expectedBadgeColor = ContextCompat .getColor(context, android.R .color.holo_red_dark)
@@ -83,5 +84,6 @@ class DrawableBadgeBuilderTest {
8384 assertEquals(Gravity .CENTER_VERTICAL or Gravity .END , actual.badgeGravity)
8485 assertEquals(false , actual.isShowBorder)
8586 assertEquals(50 , actual.maximumCounter)
87+ assertEquals(false , actual.isShowCounter)
8688 }
8789}
You can’t perform that action at this time.
0 commit comments