Questions tagged [jetpack-compose-animation]

61 questions
1
vote
1 answer

How to detect if two views(composables) are overlapping in jetpack compose?

I'm creating a 2D game with simple animations in jetpack compose. The game is simple, a balloon will float on top, a cannon will shoot arrow towards balloon. If the arrow hits balloon, player gets a point. I'm able to animate all of the above things…
1
vote
0 answers

Jetpack Compose navigation animation overlap

I am using accompanist navigation animation library. framework versions: compose version = '1.1.1' accompanist version = '0.23.1' The problem when we going back: My current animations: enterTransition = { …
1
vote
0 answers

AnimatedVisibility not working with dialog

I am trying to animate this dialog coming into the screen but animated visibility does not seem to work here. I've tried many things but none seem to work. Any ideas why this would not work and/or a possible work around? val openDialog = remember {…
1
vote
1 answer

How to continuously animate text size based on lazy column / lazy llist scroll in Android - Jetpack Compose?

I want to make a smooth transition for scaling text inside the lazy column. Currently, I am using the graphics layer to animate the text scale based on the first visible item index from the list state. But it does not provide smooth and continuous…
1
vote
1 answer

Animating between three component states in Jetpack Compose

I am familiar with the Transition API in Jetpack Compose that lets me easily animate between two states inside a Compose component. But what would be the best way to animate between three different states? Consider as an example a loading indicator…
Johan Paul
  • 2,203
  • 2
  • 22
  • 38
1
vote
0 answers

Expand/collapse animation issue in LazyColumn Jetpack compose Android

I am trying to show a section within LazyColumn which has a list of Rows that are shown horizontally using LazyRow. I would like to have a button which displays show/hide so that I can show a minimal list in this section instead of full list. I…
1
vote
1 answer

How to animate the appearance and disappearance of a composable function in Android?

I'm making a custom Radio Button that wraps an animation when I go from selected to deselected and/or vice versa. I am using the AnimatedVisibility function of jetpack compose, however I am not getting the expected result. Notice that in the gif…
1
vote
3 answers

How to i chain two parts of an animation together in jetpack compose so the the offset increases then decreases?

Ive recently got into doing animations using jet pack compose and am wondering how you can make it so that when you increase a value in an offset, once the animation reaches that value it then changes the value to another value. So like update…
0
votes
0 answers

Jetpack Compose: run enter and exit transitions sequentially in AnimatedContent

When customizing the transition of the AnimatedContent composable, one may use the function togetherWith that runs both enter and exit transitions simultaneously. AnimatedContent( targetState = animationState, transitionSpec = { …
0
votes
0 answers

Jetpack Compose Ripple effect on expanding content adapts wrongly

I have a surface in Jetpack Compose which expands on click. var expanded by remember { mutableStateOf(false) } Column(modifier = Modifier.fillMaxSize()) { Surface(color = Color.Gray, onClick = { expanded = !expanded }) { Column { …
0
votes
0 answers

Shifting up widgets with animation when a top widget go invisible in compose

I tried to make Toolbar(just a simple Text) invisible with AnimatedVisibility but after that i saw the below TextField comes up to the Toolbar(invisible) position but with no smooth animation. Anyone knows how to chain them like when the Toolbar got…
0
votes
1 answer

Android Compose PieChart animation only working on first click

I have created a PieChart using Android Compose. I have added an animation to the chart that should trigger when a slice is clicked. However, the animation is only working on the first click. Here is the relevant code: @Composable internal fun…
Niyas
  • 717
  • 11
  • 18
0
votes
0 answers

How to correctly use BottomBar (NavigationBar) for top level destination screens?

So I had such UI structure at app top level composable (Scaffold to add bottom bar) Scaffold( contentWindowInsets = WindowInsets(0, 0, 0, 0), bottomBar = { if (appState.shouldShowBottomBarAndDrawer) { AppBottomBar( …
0
votes
1 answer

How to animate item visibility only once with Jetpack Compose and AnimatedVisibility?

So when I add val state = remember { MutableTransitionState(false) } state.targetState = true AnimatedVisibility( visibleState = state, enter = slideInHorizontally( animationSpec = tween( durationMillis = 250, …
0
votes
0 answers

How to show Animation for a item of LazyColumn in Compose?

For example,I use a LazyColumn for displaying chatroom contents below: A-I like red tea!
B-Yes,it's very nice! someone joined the room As you can see,"someone joined the room" is part of this LazyColumn,but it will always show at the bottom,new…