Skip to content

Commit a8ff3ef

Browse files
committed
code refactoring.
1 parent 91eaedb commit a8ff3ef

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/src/main/java/com/sn/lib/Constants.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ object Constants {
88

99
const val SIZE_FACTOR = 1.0F
1010
const val CIRCLE_RADIUS = 360
11-
const val INNER_LOADER_POS = 80
12-
const val OUTER_LOADER_POS = 60
11+
const val INNER_LOADER_POS = 60
12+
const val OUTER_LOADER_POS = 80
1313
const val ANIM_DURATION = 1000
1414
const val INNER_ANIM_INTERPOLATOR = 6
1515
const val OUTER_ANIM_INTERPOLATOR = 5

lib/src/main/java/com/sn/lib/NestedProgress.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,19 @@ class NestedProgress @JvmOverloads constructor(
174174
val centerH: Float = height / 2f
175175

176176
outerLoadingRect.set(
177-
centerW - (INNER_LOADER_POS * sizeFactor),
178-
centerH - (INNER_LOADER_POS * sizeFactor),
179-
centerW + (INNER_LOADER_POS * sizeFactor),
180-
centerH + (INNER_LOADER_POS * sizeFactor)
181-
)
182-
183-
innerLoadingRect.set(
184177
centerW - (OUTER_LOADER_POS * sizeFactor),
185178
centerH - (OUTER_LOADER_POS * sizeFactor),
186179
centerW + (OUTER_LOADER_POS * sizeFactor),
187180
centerH + (OUTER_LOADER_POS * sizeFactor)
188181
)
189182

183+
innerLoadingRect.set(
184+
centerW - (INNER_LOADER_POS * sizeFactor),
185+
centerH - (INNER_LOADER_POS * sizeFactor),
186+
centerW + (INNER_LOADER_POS * sizeFactor),
187+
centerH + (INNER_LOADER_POS * sizeFactor)
188+
)
189+
190190
updatePaint(outerLoaderColor, outerLoaderStrokeWidth)
191191
canvas.drawArc(
192192
outerLoadingRect,

0 commit comments

Comments
 (0)