mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-20 01:05:26 +02:00
Fixed animation for TopBar text
This commit is contained in:
parent
34e918c8b4
commit
12c5f312e6
@ -19,6 +19,7 @@
|
||||
package com.sadellie.unitto.screens.main
|
||||
|
||||
import androidx.compose.animation.AnimatedContent
|
||||
import androidx.compose.animation.SizeTransform
|
||||
import androidx.compose.animation.fadeIn
|
||||
import androidx.compose.animation.fadeOut
|
||||
import androidx.compose.animation.slideInVertically
|
||||
@ -42,7 +43,9 @@ fun AnimatedTopBarText(showAppName: Boolean) {
|
||||
AnimatedContent(
|
||||
targetState = showAppName,
|
||||
transitionSpec = {
|
||||
fadeIn() + slideInVertically() with fadeOut() + slideOutVertically()
|
||||
(slideInVertically { height -> height } + fadeIn() with
|
||||
slideOutVertically { height -> -height } + fadeOut())
|
||||
.using(SizeTransform(clip = false))
|
||||
}
|
||||
) {
|
||||
Text(
|
||||
|
Loading…
x
Reference in New Issue
Block a user