2020
2121package net.newpipe.newplayer.ui.videoplayer.gesture_ui
2222
23- import androidx.compose.animation.AnimatedVisibility
2423import androidx.compose.animation.animateColor
2524import androidx.compose.animation.core.LinearEasing
2625import androidx.compose.animation.core.RepeatMode
2726import androidx.compose.animation.core.infiniteRepeatable
2827import androidx.compose.animation.core.keyframes
2928import androidx.compose.animation.core.rememberInfiniteTransition
30- import androidx.compose.animation.core.tween
31- import androidx.compose.animation.fadeIn
32- import androidx.compose.animation.fadeOut
3329import androidx.compose.foundation.layout.Box
3430import androidx.compose.foundation.layout.Column
3531import androidx.compose.foundation.layout.Row
@@ -41,9 +37,6 @@ import androidx.compose.material3.Surface
4137import androidx.compose.material3.Text
4238import androidx.compose.runtime.Composable
4339import androidx.compose.runtime.getValue
44- import androidx.compose.runtime.mutableStateOf
45- import androidx.compose.runtime.remember
46- import androidx.compose.runtime.setValue
4740import androidx.compose.ui.Alignment
4841import androidx.compose.ui.Modifier
4942import androidx.compose.ui.draw.clip
@@ -53,7 +46,6 @@ import androidx.compose.ui.res.painterResource
5346import androidx.compose.ui.res.stringResource
5447import androidx.compose.ui.tooling.preview.Preview
5548import androidx.compose.ui.unit.dp
56- import com.google.android.material.color.MaterialColors
5749import net.newpipe.newplayer.R
5850import net.newpipe.newplayer.ui.theme.VideoPlayerTheme
5951import net.newpipe.newplayer.ui.videoplayer.INDICATOR_BACKGROUND_COLOR
@@ -95,8 +87,8 @@ internal fun FastSeekVisualFeedback(modifier: Modifier = Modifier, seconds: Int,
9587 animationSpec = infiniteRepeatable(
9688 animation = keyframes {
9789 durationMillis = SEEK_ANIMATION_DURATION_IN_MS
98- Color .White .copy(alpha = 1f ) at 0 with LinearEasing
99- Color .White .copy(alpha = 0f ) at SEEK_ANIMATION_DURATION_IN_MS with LinearEasing
90+ Color .White .copy(alpha = 1f ) at 0 using LinearEasing
91+ Color .White .copy(alpha = 0f ) at SEEK_ANIMATION_DURATION_IN_MS using LinearEasing
10092 },
10193 repeatMode = RepeatMode .Restart
10294 ), label = " Arrow1 animation"
@@ -108,10 +100,10 @@ internal fun FastSeekVisualFeedback(modifier: Modifier = Modifier, seconds: Int,
108100 animationSpec = infiniteRepeatable(
109101 animation = keyframes {
110102 durationMillis = SEEK_ANIMATION_DURATION_IN_MS
111- Color .White .copy(alpha = 1f / 3f ) at 0 with LinearEasing
112- Color .White .copy(alpha = 0f ) at SEEK_ANIMATION_DURATION_IN_MS / 3 with LinearEasing
113- Color .White .copy(alpha = 1f ) at SEEK_ANIMATION_DURATION_IN_MS / 3 + 1 with LinearEasing
114- Color .White .copy(alpha = 2f / 3f ) at SEEK_ANIMATION_DURATION_IN_MS with LinearEasing
103+ Color .White .copy(alpha = 1f / 3f ) at 0 using LinearEasing
104+ Color .White .copy(alpha = 0f ) at SEEK_ANIMATION_DURATION_IN_MS / 3 using LinearEasing
105+ Color .White .copy(alpha = 1f ) at SEEK_ANIMATION_DURATION_IN_MS / 3 + 1 using LinearEasing
106+ Color .White .copy(alpha = 2f / 3f ) at SEEK_ANIMATION_DURATION_IN_MS using LinearEasing
115107 },
116108 repeatMode = RepeatMode .Restart
117109 ), label = " Arrow2 animation"
@@ -123,10 +115,10 @@ internal fun FastSeekVisualFeedback(modifier: Modifier = Modifier, seconds: Int,
123115 animationSpec = infiniteRepeatable(
124116 animation = keyframes {
125117 durationMillis = SEEK_ANIMATION_DURATION_IN_MS
126- Color .White .copy(alpha = 2f / 3f ) at 0 with LinearEasing
127- Color .White .copy(alpha = 0f ) at 2 * SEEK_ANIMATION_DURATION_IN_MS / 3 with LinearEasing
128- Color .White .copy(alpha = 1f ) at 2 * SEEK_ANIMATION_DURATION_IN_MS / 3 + 1 with LinearEasing
129- Color .White .copy(alpha = 2f / 3f ) at SEEK_ANIMATION_DURATION_IN_MS with LinearEasing
118+ Color .White .copy(alpha = 2f / 3f ) at 0 using LinearEasing
119+ Color .White .copy(alpha = 0f ) at 2 * SEEK_ANIMATION_DURATION_IN_MS / 3 using LinearEasing
120+ Color .White .copy(alpha = 1f ) at 2 * SEEK_ANIMATION_DURATION_IN_MS / 3 + 1 using LinearEasing
121+ Color .White .copy(alpha = 2f / 3f ) at SEEK_ANIMATION_DURATION_IN_MS using LinearEasing
130122 },
131123 repeatMode = RepeatMode .Restart
132124 ), label = " Arrow3 animation"
0 commit comments