From a23ffab60217bfecdb0b907b73c8508f46df5308 Mon Sep 17 00:00:00 2001 From: AlirezaJoon Date: Wed, 9 Aug 2023 09:24:45 +0330 Subject: [PATCH] fix: add label to animations for fixing lint issue --- .../nowinandroid/core/designsystem/component/LoadingWheel.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt b/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt index 55ff143a6..10ef1bfce 100644 --- a/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt +++ b/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt @@ -55,7 +55,7 @@ fun NiaLoadingWheel( contentDesc: String, modifier: Modifier = Modifier, ) { - val infiniteTransition = rememberInfiniteTransition() + val infiniteTransition = rememberInfiniteTransition(label = "wheel transition") // Specifies the float animation for slowly drawing out the lines on entering val startValue = if (LocalInspectionMode.current) 0F else 1F @@ -82,6 +82,7 @@ fun NiaLoadingWheel( animationSpec = infiniteRepeatable( animation = tween(durationMillis = ROTATION_TIME, easing = LinearEasing), ), + label = "wheel rotation animation", ) // Specifies the color animation for the base-to-progress line color change @@ -100,6 +101,7 @@ fun NiaLoadingWheel( repeatMode = RepeatMode.Restart, initialStartOffset = StartOffset(ROTATION_TIME / NUM_OF_LINES / 2 * index), ), + label = "wheel color animation", ) }