Questions tagged [jetpack-compose-animation]

61 questions
2
votes
1 answer

Animate Column from Arrangement.Center to Arrangement.Top

I am using Jetpack Compose native animations to create a complex transition with some steps. The issue is that the original Column has the arrangement set to Center and after the inclusion of some elements in the column, the arrangement needs to…
2
votes
1 answer

Jetpack Compose: How to create multi-item FAB with animation?

I'm trying to create a multi-item floating action button with the following animation: I created a multi-item floating action button but I could not implement the intended animation. I have FilterFabMenuButton composable that I show as a menu item…
2
votes
2 answers

Is it possible to change the size of the Image composable without triggering recomposition

I have an animateDpAsState(..), whenever this animation is triggered it changes the Modifier.size(value) of an Image(...) thus causing recomposition. Is there a way to skip composition phase for this specific scenario? Allowing an image to change…
2
votes
1 answer

How to animate Rect position with Animatable?

I'm building an image cropper. I'm using rectangle to draw dynamic overlay. When overlay is out of image bounds i move it back to image bounds when pointer is up. What i build open var overlayRect: Rect = Rect(offset = Offset.Zero, size =…
Thracian
  • 43,021
  • 16
  • 133
  • 222
2
votes
0 answers

Android Compose keeps recomposing

I am writing a LazyColumn, items are LazyRows. But the PasserItem keeps recomposing when gently swipe, I see log keep pringing and never stop. I come here for help. Why this happen, any state wrong? I find tow ways stop it. remove items in…
2
votes
1 answer

Compose AnimatedVisibility escapes container

I am using Jetpack Compose (version 1.1.1) and I am trying to show an snackbar-style alert coming from the top of the screen using AnimatedVisibility. However, when I do so the alert escapes its container and overlaps the content above it (in this…
Chris
  • 1,180
  • 1
  • 9
  • 17
2
votes
1 answer

Compose : advanceTimeBy doesn't work with animation

I've two Boxes and one Button. Clicking on the Button would toggle a flag and it triggers an AnimatedVisibility animation on these Boxes. Code @Composable fun TestBox() { Box( modifier = Modifier.fillMaxSize(), contentAlignment =…
2
votes
1 answer

Android Jetpack Compose (Composable) Trigger Change Manually

I have some custom composable animation that is changes value in the range [minTemperature, maxTemperature] using LaunchedEffect, and I want to trigger the animation manually. This triggered when I change the minTemperature and maxTemperature…
1
vote
1 answer

Animate Linear Gradient (Brush) infinitely and reversely in Compose

Initial State looks like this (animatedOffset = 0f) at 1f I want to get the reversed gradient: Current code: val transition = rememberInfiniteTransition(label = "NavIconGradientAnim") val animatedOffset by transition.animateFloat( …
1
vote
1 answer

Rotate icon vertically animation

I'm trying to achieve the animation which is shown on the following GIF (mb I should name it differently, instead of "rotate vertically"): I found the following example…
1
vote
1 answer

Flow pulse animation in jetpack compose

I want to build flow pulse animation. I build something similar to that but that one is not accurate what I want for my requirement. I want something like this library. @Composable fun PulseView() { val infiniteTransition =…
1
vote
1 answer

Jetpack compose animation - Can I use AnimatedVisibility inside MotionLayout?

I am trying to display splash screen where elements would have enter animation and when data would be loaded for the first time then minimize it to top app bar and display data. Edit: I managed to put both animation to one screen, but I am not sure…
1
vote
1 answer

How to animate all of the placements of my Jetpack Compose Row due to visibility changes of just one element?

I'm trying to put together an effect that looks something like iOS's in place table editing. When in "edit mode" selection controls slide in on one side of each row. I did this using a simple AnimatedVisibility on my selection button and tweaking…
Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
1
vote
1 answer

How to pause/resume a jetpack compose infinite transition animation

For my android app i'm using a custom modifier which draws a dashed border as detailed in this stackOverflow answer. I now want to conditionally animate that dashed border: If the view is currently selected, then animate, else pause. I managed to…
1
vote
0 answers

Compose: Infinite animation with variable speed

I have this code to get an infinite rotation animation: @Composable fun RotatingObject(rpm: Int) { val infiniteTransition = rememberInfiniteTransition() val rotation by infiniteTransition.animateFloat( initialValue = 0f, …