Skip to content

Commit 7f92ba8

Browse files
update IndicatorDefaults
1 parent bb1de88 commit 7f92ba8

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

progressindicator/src/main/java/com/smarttoolfactory/progressindicator/IndicatorDefaults.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,17 @@ object IndicatorDefaults {
77
val Size = 48.0.dp
88
val StaticItemColor = Color(0xff757575)
99
val DynamicItemColor = Color(0xffEEEEEE)
10+
11+
val DefaultGradientColors = listOf(
12+
Color(0xffFFEB3B),
13+
Color(0xffE91E63)
14+
)
1015
}
1116

1217
enum class SpinnerShape {
1318
Rect, RoundedRect
1419
}
20+
21+
enum class IndicatorStyle {
22+
Stroke, Filled
23+
}

progressindicator/src/main/java/com/smarttoolfactory/progressindicator/SpinningProgressIndicator.kt

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.smarttoolfactory.progressindicator
22

33
import androidx.compose.animation.core.*
44
import androidx.compose.foundation.Canvas
5-
import androidx.compose.foundation.border
65
import androidx.compose.foundation.layout.size
76
import androidx.compose.runtime.Composable
87
import androidx.compose.runtime.getValue
@@ -12,13 +11,9 @@ import androidx.compose.ui.geometry.Offset
1211
import androidx.compose.ui.geometry.Size
1312
import androidx.compose.ui.graphics.Color
1413
import androidx.compose.ui.graphics.drawscope.rotate
15-
import androidx.compose.ui.unit.dp
16-
import com.smarttoolfactory.progressindicator.ui.theme.DynamicItemColor
17-
import com.smarttoolfactory.progressindicator.ui.theme.StaticItemColor
18-
19-
enum class SpinnerShape {
20-
Rect, RoundedRect
21-
}
14+
import com.smarttoolfactory.progressindicator.IndicatorDefaults.DynamicItemColor
15+
import com.smarttoolfactory.progressindicator.IndicatorDefaults.Size
16+
import com.smarttoolfactory.progressindicator.IndicatorDefaults.StaticItemColor
2217

2318
/**
2419
* Indeterminate Material Design spinning progress indicator with rectangle or rounded rectangle
@@ -53,11 +48,7 @@ fun SpinningProgressIndicator(
5348
)
5449
)
5550

56-
Canvas(
57-
modifier = modifier
58-
.size(48.dp)
59-
.border(1.dp, Color.Red)
60-
) {
51+
Canvas(modifier = modifier.size(Size)) {
6152

6253
var canvasWidth = size.width
6354
var canvasHeight = size.height

0 commit comments

Comments
 (0)