From a585db38f6fb903602033e0698b989b571e08941 Mon Sep 17 00:00:00 2001 From: Beaven Date: Fri, 25 May 2018 16:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dloading=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E8=AE=A1=E7=AE=97=E7=B2=BE=E5=BA=A6=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zhuazhu/frame/mvp/activity/MainActivity.java | 1 + library/src/main/java/mejust/frame/widget/LoadingView.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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); } }