Skip to content

Commit

Permalink
1、fix bugs
Browse files Browse the repository at this point in the history
2、add stroke setBadgeBackground(drawable) method
  • Loading branch information
qstumn committed Mar 21, 2017
1 parent 8095051 commit 0af12bc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/q/rorbin/badgeviewdemo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void initBadge() {
.setBadgeBackground(getResources().getDrawable(R.drawable.shape_round_rect)));
badges.add(new QBadgeView(this).bindTarget(button).setBadgeText("新").setBadgeTextSize(13, true)
.setBadgeBackgroundColor(0xffffeb3b).setBadgeTextColor(0xff000000)
.setBorder(0xff000000, 1, true));
.stroke(0xff000000, 1, true));
}

private void initView() {
Expand Down
2 changes: 1 addition & 1 deletion badgeviewlib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ publish {
userOrg = 'qstumn'
groupId = 'q.rorbin'
artifactId = 'badgeview'
publishVersion = '1.0.8'
publishVersion = '1.1.0'
desc = 'android badgeview can drag dismiss like QQ'
website = 'https://github.com/qstumn/BadgeView'
}
Expand Down
2 changes: 1 addition & 1 deletion badgeviewlib/src/main/java/q/rorbin/badgeview/Badge.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface Badge {

Badge setBadgeBackgroundColor(int color);

Badge setBorder(int color, float width, boolean isDpValue);
Badge stroke(int color, float width, boolean isDpValue);

int getBadgeBackgroundColor();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ public Badge setBadgeBackgroundColor(int color) {
}

@Override
public Badge setBorder(int color, float width, boolean isDpValue) {
public Badge stroke(int color, float width, boolean isDpValue) {
mColorBackgroundBorder = color;
mBackgroundBorderWidth = isDpValue ? DisplayUtil.dp2px(getContext(), width) : width;
invalidate();
Expand Down

0 comments on commit 0af12bc

Please sign in to comment.