Skip to content

Commit

Permalink
Fix epg control animation in playlist configuration screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyroid committed Jul 19, 2024
1 parent 25be1a0 commit 2995ceb
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import android.os.Build
import android.provider.Settings
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.expandIn
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.layout.Arrangement
Expand Down Expand Up @@ -36,6 +38,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.unit.IntSize
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.LifecycleResumeEffect
import androidx.lifecycle.compose.collectAsStateWithLifecycle
Expand Down Expand Up @@ -185,7 +188,17 @@ private fun PlaylistConfigurationScreen(
}

item {
AnimatedVisibility(playlist.epgUrlsOrXtreamXmlUrl().isNotEmpty()) {
AnimatedVisibility(
visible = playlist.epgUrlsOrXtreamXmlUrl().isNotEmpty(),
enter = fadeIn() + expandIn(
expandFrom = Alignment.BottomCenter,
initialSize = { IntSize(it.width, 0) }
),
exit = fadeOut() + shrinkOut(
shrinkTowards = Alignment.BottomCenter,
targetSize = { IntSize(it.width, 0) }
)
) {
Column(
verticalArrangement = Arrangement.spacedBy(spacing.small)
) {
Expand Down

0 comments on commit 2995ceb

Please sign in to comment.