Skip to content

Commit

Permalink
Merge pull request #16 from xxjy/master
Browse files Browse the repository at this point in the history
修复圆角显示不正确问题
  • Loading branch information
qstumn committed Mar 8, 2017
2 parents 865dc8e + 0b4cc9b commit 769f9e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/build
/captures
.externalNativeBuild
.idea
5 changes: 2 additions & 3 deletions badgeviewlib/src/main/java/q/rorbin/badgeview/QBadgeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,8 @@ private void drawBadge(Canvas canvas, PointF center, float radius) {
mBadgeBackgroundRect.top = center.y - (mBadgeTextRect.height() / 2f + mBadgePadding * 0.5f);
mBadgeBackgroundRect.right = center.x + (mBadgeTextRect.width() / 2f + mBadgePadding);
mBadgeBackgroundRect.bottom = center.y + (mBadgeTextRect.height() / 2f + mBadgePadding * 0.5f);
canvas.drawRoundRect(mBadgeBackgroundRect,
DisplayUtil.dp2px(getContext(), 100), DisplayUtil.dp2px(getContext(), 100),
mBadgeBackgroundPaint);
radius = mBadgeBackgroundRect.height() / 2f;
canvas.drawRoundRect(mBadgeBackgroundRect, radius, radius, mBadgeBackgroundPaint);
}
if (!mBadgeText.isEmpty()) {
canvas.drawText(mBadgeText, center.x,
Expand Down

0 comments on commit 769f9e1

Please sign in to comment.