Questions tagged [android-jetpack-compose-animation]
14 questions
6
votes
1 answer
How to make Rainbow border animation for box in compose?
How to make Rainbow border animation for box in compose, all the examples that I saw are for Circle and they use rotate with drawbehind, but what I really need is to make the same for a Box in compose.
Thanks
With rotate but it didn´t work

Talal
- 61
- 4
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
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(
…

user924
- 8,146
- 7
- 57
- 139
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…

user924
- 8,146
- 7
- 57
- 139
1
vote
0 answers
Why when animating using animateContentSize(), the content bounces off the edge of the container
Below is a simplified version of the bar from the diagram that I am implementing. While scrolling the chart, I change its scale and would like to animate it, but during the animation, the edge of the column moves away from the edge of the chart. How…

Olesya
- 11
- 3
0
votes
0 answers
Kotlin Jetpack Compose AnimateIntAsState() behaves differently depending on whether the target is larger
So, I am trying to animate a bar in Jetpack Compose and I found that the function "animateIntAsState" acts very weirdly. To better explain my problem, I made a video showing the target value and animated value which you can find at…

Johnny
- 11
- 1
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,
…

user924
- 8,146
- 7
- 57
- 139
0
votes
1 answer
Draw Pulse animation in canvas in jetpack compose
I am learning pulse animation in jetpack compose. I made a pulse animation with the help of Box. I want to convert this animation view in Canvas. I only find a way to drawCircle in canvas. I didn't find helpful article. Can anyone help me on this?…

Kotlin Learner
- 3,995
- 6
- 47
- 127
0
votes
0 answers
animateDpAsState with graphicsLayer recompose button multiple times
In below code I have used animateDpAsState and it recompose function only once but button recompose multiple times.
@Composable
fun MoveText() {
LogCompositions("JetpackCompose.app", "========CustomText function")
var visible by remember {…

Darshan Mistry
- 3,294
- 1
- 19
- 29
0
votes
1 answer
Idomatic way of using animateDpAsState in padding jetpack compose
I am learning animateDpAsState from the doc. I did it without any problem, but I see a lot of recomposing happens. So I want to know what is the recommended way of doing this?
@Composable
private fun PaddingViewAnimation() {
var visible by…

Kotlin Learner
- 3,995
- 6
- 47
- 127
0
votes
1 answer
How to measure height and apply in view jetpack compose
I want to measure the height of parent view and animate accordingly to that. I tried from this answer. I think it returns 0.dp to me. So what is the proper way of measuring the item?
Actually I want to animate a view, but my view is 0.dp when I run…

Kotlin Learner
- 3,995
- 6
- 47
- 127
0
votes
1 answer
How to animate as size in jetpack compose
I want to make a size of Column to be 0.dp after all my animation done. I am trying to shrink my Column to 0.dp after all children hide. I tried below of this code
@Preview(showBackground = true)
@Composable
fun MoveText() {
var columnHeightPx…

Kotlin Learner
- 3,995
- 6
- 47
- 127
0
votes
1 answer
How to slideOutVertically very slowly in jetpack compose
I want to slide out vertically from my initial position to another point very slowly. Suppose my initial position is 50.dp THEN it goes to 49.dp,48.dp....0.dp. I tried some piece of code but to goes to directly 0.dp and then hide which i don't want.…

Kotlin Learner
- 3,995
- 6
- 47
- 127
0
votes
1 answer
Need help on Jetpack Compose Animation - Kotlin
I am a newbie in android Kotlin development, it would be really appreciable, if someone can help me out. I already spent more than a week on the research of jetpack compose animation.
I have been trying to create a control where the circle has to…

sree_iphonedev
- 3,514
- 6
- 31
- 50