Skip to content

Commit 3dde895

Browse files
authored
[Improvement] Channel Sounding improvements (#202)
* Improved parsing of host capabilities * Unused method removed * CS: Not supported message split into 2 * CS: UI unified with other profiles * CS: Error message improved * CS: Minor * Option to set the color of animated dots * CS: Improved UI with much more options * CS: Making invalid data graph less prominent
1 parent 1054d8a commit 3dde895

11 files changed

Lines changed: 1226 additions & 698 deletions

File tree

lib_ui/src/main/java/no/nordicsemi/android/ui/view/AnimatedThreeDots.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ import androidx.compose.ui.unit.dp
3030
@Composable
3131
fun AnimatedThreeDots(
3232
modifier: Modifier = Modifier,
33-
dotSize: Dp = 8.dp
33+
dotSize: Dp = 8.dp,
34+
color: Color = MaterialTheme.colorScheme.onSurface,
3435
) {
3536
val dotCount = 3
3637
val infiniteTransition = rememberInfiniteTransition()
@@ -52,6 +53,7 @@ fun AnimatedThreeDots(
5253

5354
Row(
5455
modifier = modifier,
56+
verticalAlignment = Alignment.CenterVertically,
5557
horizontalArrangement = Arrangement.Center
5658
) {
5759
dotAlphas.forEach { alpha ->
@@ -60,7 +62,7 @@ fun AnimatedThreeDots(
6062
.padding(1.dp)
6163
.size(dotSize)
6264
.clip(CircleShape)
63-
.background(MaterialTheme.colorScheme.onSurface.copy(alpha = alpha.value))
65+
.background(color.copy(alpha = alpha.value))
6466
)
6567
}
6668
}
@@ -85,7 +87,8 @@ fun TextWithAnimatedDots(
8587
Spacer(modifier = Modifier.width(2.dp))
8688
AnimatedThreeDots(
8789
modifier = modifier.padding(bottom = 4.dp),
88-
dotSize = dotSize
90+
dotSize = dotSize,
91+
color = textStyle.color
8992
)
9093
}
9194
}

0 commit comments

Comments
 (0)