41 questions
0
votes
0
answers
31
views
ShrinkOut's clip set to false and expandIn set to true, EnterTransition does not meet expectations
I am learning EnterTransition and ExitTransition. When I set ExitTransition to shrinkOut and shrinkOut's clip=false, and EnterTransition uses expandIn and clip=true, the entering animation is not ...
0
votes
1
answer
123
views
Shared element transition: renderInSharedTransitionScopeOverlay().animateEnterExit() - Unresolved reference: animateEnterExit
From the docs I found the following sample code:
Sometimes you might want your non-shared composable to animate away as
well as remain on top of the other composables before the transition.
In such ...
2
votes
2
answers
449
views
AnimatedVisibility fadeIn animations do not work for recomposed items but only for items enter composition?
I'm filtering items based on user selection and animating them back in a FlowRow that also inside a LazyColumn with keys are unique, however Compose does not remove items from composition, which is ...
1
vote
0
answers
167
views
SharedTransitionLayout cauding crash with constrain layout
I am using sharedTransitionLayout in my app, and composables in my NavHost were previously not using ConstraintLayout, I recently used ConstraintLayout in few composables in my navigation screens and ...
0
votes
1
answer
66
views
Jetpack animation snapTo inside LaunchedEffect is not soon enough, wonky lifecycle
Using this code to show a paginated graph, when the page changes the entire graph is rendered for a frame and then I get my animation starting from zero. I think this is because the code inside ...
4
votes
1
answer
196
views
How to track position, angle or position is in Path or track letter drawing in Jetpack Compose?
This is a share your knowledge, Q&A-style question inspired from a developer asking about how to track letters in Jetpack Compose Path as in image below. And includes how to track angle as well to ...
1
vote
1
answer
297
views
Compose project crash when adding the compose animation library with shared element transition
I'm using compose version compose-bom 2023.03.00 and when I try to add the latest compose animation module (1.7.0-alpha07) with shared elements update, the app crashes on launch with error showing
...
0
votes
1
answer
364
views
Jetpack compose. Animation duration is incorrect on some devices
I'm using Animatable to implement linear progress animation.
Here is my code:
val progress = remember(currStory) { Animatable(0f) }
progress.animateTo(
targetValue = 1f,
...
0
votes
1
answer
176
views
Simulating vintage blinking cursor in Jetpack Compose
I'm developing a WearOS application, and for a specific piece of data I decided — I'm toying with the idea — that the most compact display would be a matrix of dots.
Each dot can be: OFF (almost black,...
0
votes
2
answers
589
views
AnimatedVisibility is not working with weights
Here is a simple example to reproduce the issue I'm having:
@Composable
fun AnimatedVisibilityEx(modifier: Modifier = Modifier) {
var visible by remember { mutableStateOf(true) }
Box(modifier ...
4
votes
1
answer
478
views
How can I determine whether a 2D Point is within a Polygon or Complex Path with Jetpack Compose?
This is a share your knowledge, Q&A-style to explain how to detect whether a polygon or a complex shapes such as some section of path is touched as in gif below. Also it contains how to animate ...
5
votes
2
answers
3k
views
Dynamically Change Navigation Animation - Jetpack Compose
How can I change the navigation animation of the same destination when navigating in jetpack compose? For example, I want to show the screen horizontally from the right and other times I want that ...
2
votes
1
answer
932
views
In Jetpack Compose can I configure an animation to run with a constant velocity rather than a constant time?
In my example I am moving some game pieces around on a board. Sometimes the pieces are moving long distances and sometimes the pieces are moving short distances.
I am achieving the animation using ...
3
votes
1
answer
4k
views
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 ...
1
vote
1
answer
721
views
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 https://blog....
0
votes
1
answer
924
views
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 ...
0
votes
0
answers
588
views
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", &...
0
votes
1
answer
4k
views
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 ...
1
vote
1
answer
1k
views
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 ...
7
votes
1
answer
5k
views
Android Compose create shake animation
I am trying to make shaking animation of shape in Jetpack Compose. I want to use this animation to show error when user enters invalid Pin code. But all I can find is slide in, slide out animations ...
2
votes
2
answers
951
views
LazyColumn swap item animation
I have a list with 10 items one of them have this elements "rankingCurrentPlace", "rankingPastPlace" and "isUser:true".
What i need to do its an animation on the ...