Questions tagged [jetpack-compose-animation]
61 questions
8
votes
2 answers
Jetpack Compose Arc/Circular Progress Bar Animation (How to restart animation)
How do I create a Arc Progress bar animation like this
Currently I've already used Canvas to draw an arc and added animations to the progress bar using animateFloatAsState API. But second pic is not my expected.
[]
// e.g. oldScore = 100f …

Claire
- 93
- 6
7
votes
3 answers
Animate visibility in compose
I have a text which need to be animated to show and hide with the value is null or not. it would have been straight forward if the visibility is separately handle, but this is what I got.
In the bellow code the enter animation works but the exit…

SproutinGeek
- 327
- 3
- 19
7
votes
1 answer
How to make text number animated when display in jetpack compose?
I want to show text with numbers and I wanted to achieve is to animate that text while displaying it. The animation is it should increase the counter from zero to the target value number. I tried using animateIntAsState but it's not working.
This is…

Jeevan Rupacha
- 3,055
- 1
- 15
- 29
5
votes
1 answer
How to animate list initial population in Android Jetpack compose
My current Android Jetpack Compose project contains a number of lists and grids.
I would like to animate the initial population of my lists and grids to bring some life to my application.
I have found documentation for inserting, deleting etc. of…

Hector
- 4,016
- 21
- 112
- 211
5
votes
2 answers
Continuous recomposition in Jetpack Compose
I'm trying to create a sky view in my Android app using Jetpack Compose. I want to display it inside a Card with a fixed height. During nigth time, the card background turns dark blue and I'd like to have some blinking stars spread over the sky.
To…

Pion Developer
- 97
- 9
5
votes
1 answer
Jetpack Compose - Play complex animation on state change
How do I play a complex animation using coroutine on switching to a particular state?
@Composable
fun SomeView(viewModel: SomeViewModel) {
val state by viewModel.stateFlow.collectAsState()
val scope = rememberCoroutineScope()
...
…

Fried Rice
- 3,295
- 3
- 18
- 27
4
votes
1 answer
Animation in Jetpack Compose (AnimatedVisibility) not working at all for me?
I want to animate some text's visibility to not just appear/disappear but to slide in/out in Jetpack Compose Android app that I'm building.
I just literally copy-pasted that little code snippet from developer.android.com/jetpack/compose/animation…

Milos
- 168
- 2
- 12
4
votes
1 answer
Jetpack Compose animateFLoatAsState replaced by Transition.animateFloat is not working
Could you tell me why it stops working when I use val animateAngle: Float by transition.animateFloat instead of val animateAngle by animateFloatAsState?
It seems that the variable rotated is not updated when the button is clicked.
var rotated…

ntos
- 189
- 10
3
votes
1 answer
How to check which arc or pie chart segment clicked in Jetpack Compose?
This is a share your knowledge, Q&A-style question inspired by this question to detect which section of arc segment or degree of touch inside a circle or semi-circle as in gif and image below. Also how stroke width changes are set by default inwards…

Thracian
- 43,021
- 16
- 133
- 222
3
votes
1 answer
How to Reset the state of compose views animating
I am building an onboarding fragment that gives users tips for each screen. there are multiple pages of a few lines:
Page 1
this icon does this
that icon does that
Button: Next
Page 2
this icon does this
that icon does that
Button: Finish
I want…

siliconeagle
- 7,379
- 3
- 29
- 41
3
votes
0 answers
Using paddingValues as padding for content makes animated visiblility have jumpy effect
Using PaddingValues for content padding makes Animated visiblility have jumpy effect for a few seconds after Hiding bottom bar. The jumpy effect only goes off only when PaddingValues is not used in the content. but I need to use the padding values…

Sky
- 127
- 9
3
votes
2 answers
How to implement a translate + scale animation in Jetpack Compose?
I have a screen with an Image at one corner of the screen and I want to animate it to the centre of the screen.
Something like going from
Icon(
painter = //,
contentDescription = //,
modifier = Modifier.size(36.dp)
)
to
Icon(
…

Arpit Shukla
- 9,612
- 1
- 14
- 40
3
votes
1 answer
How to rotate a composable and add a progress listener to the rotation?
I am trying to convert my View based code to Compose. I have a composable which takes an image (Painter) as argument and displays it using Image composable. What I want is that whenever the argument value changes, my Image should do a 360 degree…

Arpit Shukla
- 9,612
- 1
- 14
- 40
3
votes
1 answer
How to animate elements of a dynamic list in Jetpack Compose?
How can I transition elements of a list to the new list (possibly different size) with animation?
I have a pie chart and when its slices (fractions) change, I want to animate the previous fractions to the new fractions. The thing is, number of…

Mahozad
- 18,032
- 13
- 118
- 133
2
votes
1 answer
How do I animate the visibility of a weighted composable?
I have this composable here with a history, an input/output, and a button to show/hide the history (I have removed the parameters unnecessary to my concern):
@Composable
fun MainWindow(
isShowingHistory: Boolean,
showHistory: () -> Unit,
…

hamthenormal
- 856
- 8
- 21