diff --git a/app/src/main/java/com/zhuazhu/frame/mvp/activity/MainActivity.java b/app/src/main/java/com/zhuazhu/frame/mvp/activity/MainActivity.java index c48311a..9f7d89f 100644 --- a/app/src/main/java/com/zhuazhu/frame/mvp/activity/MainActivity.java +++ b/app/src/main/java/com/zhuazhu/frame/mvp/activity/MainActivity.java @@ -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) { diff --git a/library/src/main/java/mejust/frame/widget/LoadingView.java b/library/src/main/java/mejust/frame/widget/LoadingView.java index 74da872..54d3c85 100644 --- a/library/src/main/java/mejust/frame/widget/LoadingView.java +++ b/library/src/main/java/mejust/frame/widget/LoadingView.java @@ -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); } }