Questions tagged [android-motionscene]
13 questions
4
votes
2 answers
Motion layout not animating views that are not its direct children
I have recently tried the MotionLayout, I works fine on a button when it is a direct child of the MotionLayout but the same motion scene does not work, when I enclose the button in another layout, bu the parent layout is still MotionLayout.
First…

Kaveri
- 1,060
- 2
- 12
- 21
4
votes
2 answers
How to run animation defind in the Android MotionLayout/MotionScene infinitely?
I read this document by Google: Manage motion and widget animation with MotionLayout
I have also read a few more doc such as Getting Started with the Motion Editor in Android Studio 4.0
The problem is they both talk about how to start the animation…

Hesam
- 52,260
- 74
- 224
- 365
3
votes
1 answer
OnSwipe dragUp doesn't work on View with child in MotionLayout
I want to use MotionLayout to implement the Bottom Sheet in my activity.
Motion scene:

Ramin Abdolmaleki
- 189
- 9
1
vote
1 answer
Changing height and width of view in keyframes
I need animation which expands a view from height and width of wrap_contents to match constraints, in my case it is to expand as much as parent allows in width but in 50% animation I want that view to first move to center without modifying its…

TheKarlo95
- 1,144
- 9
- 17
1
vote
1 answer
MotionLayout: After transition horizontal recyclerview doesn't display the first element
I'm trying to implement a Transition but I have an issue with the first element of the recyclerview. Currently, the transition looks like this:
When the transition ends the first element in the recyclerview is not displayed, but after I've…

Armando
- 583
- 2
- 7
- 16
0
votes
0 answers
How to set textview size in android MotionLayout when animation executing?
I'm using an Android motion layout. Animation is implemented through scale change, but the size of the internal text view is reduced together, making it strange to see.
Is there a way to fix or increase the size of the internal textview?
Here I…

jihunAn
- 1
- 1
0
votes
0 answers
How can I use MotionLayout to hide/show views only when scrolling a RecyclerView that is too big for the screen?
I have a Fragment which is used to make searches. Its layout has a "search bar" at the top, and then there is a TextView and a RecyclerView where I display the results. I would like to hide/show the search bar and the TextView when user scrolls,…

xerez
- 35
- 5
0
votes
0 answers
MotionLayout and Motion Editor not working properly and showing different results
I have troubles with MotionLayout and MotionScene.
In the Motion Editor, I can see my animation and it looks fine (except for some artifacts), but when I run the app on the emulator, the animation doesn't match the Motion Editor view.
Motion Editor…

wowandy
- 1,124
- 2
- 10
- 23
0
votes
1 answer
Attempt to invoke virtual method 'int androidx.constraintlayout.motion.widget.MotionScene$Transition.getStartConstraintSetId()' on a null object refer
While I was working in motion layout. I got an error saying
Attempt to invoke virtual method 'int androidx.constraintlayout.motion.widget.MotionScene$Transition.getStartConstraintSetId()' on a null object reference

Aditya Cheke
- 53
- 2
- 4
0
votes
1 answer
Motionlayout two transitions not working properly
We are creating a transitions like youtube. We have exo player area and recyclerview underneath.
When user drags top player area it should collapse and become mini player.
When vertical video comes(9:16), scrolling recyclerview should minimise…

RahulS
- 11
- 6
0
votes
1 answer
Apply bezier curve to MotionLayout at runtime
I have used this article to create an expand/collapse cardview component. Right now, the expand/collapse animation is linear. I want to apply a bezier curve to the animation so that the animation will be ease-in-out. I have googled a lot and…

Jayesh Babu
- 1,389
- 2
- 20
- 34
0
votes
1 answer
MotionLayout kotlin how reset scene and visibility?
I have a FlashCards app and i have a flip card scene. I'm working with visibility of elements and I need also MotionScene there. I have problem, how reset Motion and set desire visibility of elelements? My scene works fine after first click. Then I…

wenus
- 1,345
- 6
- 24
- 51
0
votes
0 answers
Add a drawable on textView during MotionScene
Is there a way do add a drawable (on the left) of a textView during a MotionScene?
I have try to use customAttribute (name "drawableLeft" & "drawableStart"), with customStringValue (my drawable) with no success... The drawable don't appear during…

JohnDoe
- 83
- 1
- 6