Questions tagged [jetpack-compose-animation]

61 questions
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 {…
0
votes
0 answers

Crossfade animation not working on changing page

when i am changing page it should have fading animation but it is not working. I have check the same code in my other project written by other developer where he is using the state from viewmodel and it is working. val selectedPage = remember {…
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…
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.…
0
votes
0 answers

Jetpack Compose syncronize Animated Visibility animation based on state

I am using an Material 2 version of a BottomSheet and I get the animations current progress, I want to synchronize the appearance of the Top App Bar so that when the Bottom Sheet is fully up it is also visible. This question applies to other kind of…
0
votes
1 answer

How can I an animation on boolean change with jetpack compose?

Question How can I achieve something like a wiggle animation with jetpack compose when a boolean is changing? From my understanding the library only supports transition animations or infinite animations. However in my case no composable object is…
pafi
  • 619
  • 1
  • 8
  • 20
0
votes
0 answers

Can AnimatedContent work correctly if the identical target state is issued multiple times?

I'm implementing AnimatedContent and I'm noticing that when my state issues the same target as is currently displaying (when new paged results for a list are issued from the view model) AnimatedContent is performing its transition even though it is…
jchristof
  • 2,794
  • 7
  • 32
  • 47
0
votes
0 answers

Android, Compose: how to create animated custom circle progress bar?

I need to implement view to show the remaining time. I implemented the component itself and drew it on canvas, my custom component takes the following parameters: currentTime, minTime, maxTime. @Composable fun CustomProgressBar( currentTime:…
0
votes
1 answer

Why my right edge of the Box in Compose is vibrating while expanding and collapsing?

Animation is not at all smooth enough, it is just like lagging Here I am using a simple box, I am expanding its width using animateFloatAsState. Without any animation of its inside element, it is not at all smooth enough. Where I am doing…
0
votes
2 answers

Multiple Animations are Not Launching At the Same Time in Jetpack Compose

I have 3 animations, but the top one launches first, then the other two, how do I get them all to launch at the same time? I tried putting them in the same coroutine scope but still getting same results. LaunchedEffect(isItemInView) { …
0
votes
0 answers

animatedFloatAsState hold different value than updated target value jetpack compose

I am trying to animate the float value using animateFloatAsState but while I am updating the target value the animated value gives me random different value . For eg: This is the animatedValue : val animatedOffsetValue by animateFloatAsState( …
0
votes
1 answer

Repeating translation animaiton in compose

I want to achieve a translation animation which will run continuously till some values from sever will stop it. Here is the image of what I need to achieve : you can see a white vertical line over this which is an image. I need to translate it from…
0
votes
1 answer

Android Jetpack Compose complex animate performance issue

i just started the compose animation and now I'm confused I Have a login screen and ı want to with animation but ı noticed to performance issues on my code. When ı click the box on first time coming lagyly and ı dont wanna that what can do for this…
0
votes
2 answers

Animate Canvas content change

I have an image that is occupying the whole screen. It is like a background. I am rendering using a Canvas with the method drawImage(...) which renders it just fine, and to my expectations. I want to change the source of the Image upon clicking on…
0
votes
1 answer

Sliding an item next to the expanding animation

I've got the following animation: The problem is: When animation's starting the search icon (magnifier) slides immediately to the left of the screen. When the search bar is folding back the icon moves smoothly and near the end speed up. What I…