Questions tagged [android-motionlayout]

MotionLayout is intended to move, resize, and animate UI elements with which users interact, such as buttons and title bars. Motion in your app should not be simply a gratuitous special effect in your application. It should be used to help users understand what your application is doing. For more information on designing your app with motion, see the Material Design section on

https://material.io/design/motion

Getting started with MotionLayout

Follow the steps described in the following link.

https://developer.android.com/training/constraint-layout/motion-layout#getting_started

430 questions
11
votes
0 answers

MotionLayout: OnSwipe and OnClick on same view

I am using MotionLayout for my page. I have two states which is toggled with OnSwipe of a view:
11
votes
5 answers

android:textSize change in MotionLayout

I am going to animate text size change using MotionLayout. I do the following for start state And the following for end state
Artyom
  • 1,165
  • 14
  • 22
11
votes
2 answers

MotionLayout inside the ScrollView does not update the height after the state change

I have a MotionLayout inside the NestedScrollView:
jclova
  • 5,466
  • 16
  • 52
  • 78
11
votes
3 answers

Android collapsing toolbar with MotionLayout - disable motion when RecyclerView is empty/not scrollable

I'm trying to use the MotionLayout View to get a collapsing toolbar behavior. My approach is similar to the example here: https://blog.stylingandroid.com/motionlayout-collapsing-toolbar-part-1/ This works fine, but the transition also starts on…
11
votes
2 answers

Android MotionLayout Transition Listener not called

I'm trying to make a slide animation. For it I use a MotionLayout with a MotionScene containing two ConstraintSet. The slide animation works fine. However I get an error in the LogCat: E/MotionLayout: WARNING NO app:layoutDescription…
10
votes
2 answers

MotionLayout problems with children intercepting touch events

I have a motionLayout for the root container, in my main layout. Inside it, there are other views. One of them is a frameLayout, containing a fragment. The fragment is a page, consisting a NestedScrollView etc... MotionLayout has OnSwipe for only…
10
votes
2 answers

TextView flickers on size animation in MotionLayout

I'm currently trying to create a toolbar animation with the MotionLayout. Everything works fine except the fact that the TextView which is centered by constraints and defined with the height and width "wrap_content" is partly flickering when the…
mkl
  • 627
  • 1
  • 8
  • 18
10
votes
2 answers

Android MotionLayout state not updating when changing constraint programatically

I have a very simple MotionLayout and I'm trying to change the visibility of one of the constraints programatically and have the view reflect that change. However the change isn't reflected until I transition away from the current state and then…
odiggity
  • 1,496
  • 16
  • 29
10
votes
3 answers

Android CustomAttribute in MotionLayout to change Text in TextView

Anyone can help me with the correct way to change TextView's text in MotionLayout... this is what I doing. I'm testing the MotionLayout on a Simple App... I reach the part on the Motion tutorials about CustomAttributes With them you can change the…
9
votes
6 answers

Motion Layout with swipe gesture + SwipeRefreshLayout + RecyclerView bug wrong behavior scrolling up

I'm using MotionLayout to build UI with 2 parts - top one with some view and bottom one with SwipeRefresh and RecyclerView inside. Also I have a single gesture for MotionLayout - SwipeRefresh moves up above top view on swipe up. The problem is when…
9
votes
1 answer

Android MotionLayout: How to handle both click and swipe events on same view? (video examples included)

I need to implement this in my app. It's best if you looked at the video examples because I can't explain it precisely with words: Drag motion : https://streamable.com/i0aen Click motion :https://streamable.com/7eahj I was able to implement them…
Vuk Vukcevic
  • 131
  • 8
8
votes
3 answers

slowing down motionLayout animation on swipe

I have motionLayout animation with the transition:
Rainmaker
  • 10,294
  • 9
  • 54
  • 89
8
votes
1 answer

MotionLayout: Click and Touch not working in view with transition in motion scene (Youtube player like UI)

I have a Youtube video player like view, where I have a list which on click, plays a video in the next screen. I have added Motionscene to the video view so while dragging down, the video view becomes small. But while doing so the onClick or onTouch…
8
votes
4 answers

Android MotionLayout crashes when migrating from alpha-2 to alpha-3

I'm playing with MotionLayout and got a strange issue When i changed used library version from com.android.support.constraint:constraint-layout:2.0.0-alpha2 to com.android.support.constraint:constraint-layout:2.0.0-alpha3 my app…
7
votes
1 answer

MotionLayout Group Visibility Issue

I have a Constraint Layout which contains a RecyclerView, a TextInputEditText, a Constraint Group (which handles visibility of the RecyclerView and TextInputEditText, an ImageView and a LottieAnimationView. It works as this: On startup, only the…
1
2
3
28 29