Skip to content

Commit c23fd1f

Browse files
committed
code review.
1 parent 29f94dc commit c23fd1f

12 files changed

Lines changed: 18 additions & 18 deletions

File tree

app/src/main/java/com/commandiron/composeloading/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fun ShowScreen() {
7272

7373
12 -> { FoldingCube(Modifier.background(StarCommandBlue).fillMaxSize()) }
7474

75-
13 -> { LoadingBar(fakeMillis = 10000) }
75+
13 -> { LoadingBar(fakeMillis = 10000, fillColor = Bluetiful) }
7676

7777
14 -> { LoadingDots("Loading") }
7878
}

app/src/main/java/com/commandiron/composeloading/ui/theme/Theme.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import androidx.compose.runtime.Composable
88
import androidx.compose.ui.graphics.Color
99

1010
private val DarkColorScheme = darkColorScheme(
11-
primary = Bluetiful,
12-
surface = Color.White,
11+
primary = Color.White,
12+
onPrimary = Color.Black
1313
)
1414

1515
private val LightColorScheme = lightColorScheme(
16-
primary = Bluetiful,
17-
surface = Color.White
16+
primary = Color.White,
17+
onPrimary = Color.Black
1818
)
1919

2020
@Composable

compose-loading/src/main/java/com/commandiron/compose_loading/ChasingDots.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fun ChasingDots(
2424
durationMillis: Int = 2000,
2525
delayBetweenDotsMillis: Int = 50,
2626
size: Dp = 30.dp,
27-
color: Color = MaterialTheme.colorScheme.surface,
27+
color: Color = MaterialTheme.colorScheme.primary,
2828
circleRatio: Float = 0.25f
2929
) {
3030
val transition = rememberInfiniteTransition()

compose-loading/src/main/java/com/commandiron/compose_loading/ChasingTwoDots.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fun ChasingTwoDots(
2424
durationMillis: Int = 2000,
2525
durationBetweenDotsMillis: Int = 400,
2626
size: DpSize = DpSize(30.dp, 30.dp),
27-
color: Color = MaterialTheme.colorScheme.surface,
27+
color: Color = MaterialTheme.colorScheme.primary,
2828
) {
2929
val transition = rememberInfiniteTransition()
3030

compose-loading/src/main/java/com/commandiron/compose_loading/Circle.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fun Circle(
1919
size: Dp = 30.dp,
2020
durationMillis: Int = 1400,
2121
delayMillis: Int = 0,
22-
color: Color = MaterialTheme.colorScheme.surface,
22+
color: Color = MaterialTheme.colorScheme.primary,
2323
shape: Shape = CircleShape,
2424
) {
2525
Box(

compose-loading/src/main/java/com/commandiron/compose_loading/DoubleBounce.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fun DoubleBounce(
2222
durationMillis: Int = 2000,
2323
delayMillis: Int = 0,
2424
size: DpSize = DpSize(30.dp, 30.dp),
25-
color: Color = MaterialTheme.colorScheme.surface,
25+
color: Color = MaterialTheme.colorScheme.primary,
2626
shape: Shape = CircleShape
2727
) {
2828
val transition = rememberInfiniteTransition()

compose-loading/src/main/java/com/commandiron/compose_loading/LoadingBar.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fun LoadingBar(
3434
width: Dp = 200.dp,
3535
backgroundColor: Color = MaterialTheme.colorScheme.background,
3636
fillColor: Color = MaterialTheme.colorScheme.primary,
37-
borderColor: Color = Color.Black
37+
borderColor: Color = MaterialTheme.colorScheme.onPrimary
3838
) {
3939
val loadingBarProgress = remember {
4040
Animatable(0f)

compose-loading/src/main/java/com/commandiron/compose_loading/Pulse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fun Pulse(
2121
durationMillis: Int = 1000,
2222
delayMillis: Int = 0,
2323
size: DpSize = DpSize(30.dp, 30.dp),
24-
color: Color = MaterialTheme.colorScheme.surface,
24+
color: Color = MaterialTheme.colorScheme.primary,
2525
shape: Shape = CircleShape,
2626
) {
2727
val transition = rememberInfiniteTransition()

compose-loading/src/main/java/com/commandiron/compose_loading/RotatingPlane.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fun RotatingPlane(
2525
durationMillis: Int = 1200,
2626
delayMillis: Int = 0,
2727
size: DpSize = DpSize(30.dp, 30.dp),
28-
color: Color = MaterialTheme.colorScheme.surface,
28+
color: Color = MaterialTheme.colorScheme.primary,
2929
shape: Shape = RectangleShape,
3030
contentOnPlane: @Composable BoxScope. () -> Unit = {}
3131
) {

compose-loading/src/main/java/com/commandiron/compose_loading/ThreeBounce.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ import com.commandiron.compose_loading.transition.fractionTransition
1818
@Composable
1919
fun ThreeBounce(
2020
modifier: Modifier = Modifier,
21-
size: DpSize = DpSize(30.dp, 30.dp),
22-
color: Color = MaterialTheme.colorScheme.surface,
23-
shape: Shape = CircleShape,
2421
durationMillis: Int = 1400,
25-
delayBetweenDotsMillis: Int = 160
22+
delayBetweenDotsMillis: Int = 160,
23+
size: DpSize = DpSize(30.dp, 30.dp),
24+
color: Color = MaterialTheme.colorScheme.primary,
25+
shape: Shape = CircleShape
2626
) {
2727
val transition = rememberInfiniteTransition()
2828

0 commit comments

Comments
 (0)