Skip to content

Commit

Permalink
修复loading视图大小计算精度丢失
Browse files Browse the repository at this point in the history
  • Loading branch information
beaven11 committed May 25, 2018
1 parent 95c5e5a commit a585db3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void second(View v) {

@TitleBarMenu(location = TitleBarMenuLocation.rightFirstMenu, text = "第一")
public void detail(View v) {
showLoading(true);
}

public void onClick(View v) {
Expand Down
4 changes: 2 additions & 2 deletions library/src/main/java/mejust/frame/widget/LoadingView.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ private void drawLoading(Canvas canvas, int rotateDegrees) {
canvas.translate(centerSize, centerSize);
for (int i = 0; i < LINE_COUNT; i++) {
canvas.rotate(DEGREE_PER_LINE);
float radius = (height / 4) + i * (height / 28);
double radius = (7 + i) * height / 28.0;
canvas.translate(0, -loadSize / 2 + width / 2);
canvas.drawCircle(0, 0, radius, paint);
canvas.drawCircle(0, 0, (float) radius, paint);
canvas.translate(0, loadSize / 2 - width / 2);
}
}
Expand Down

0 comments on commit a585db3

Please sign in to comment.