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

349 questions
45
votes
5 answers

android:visibility changes to children of MotionLayout

I must be missing something with android:visibility changes within a motion layout. Here’s a simplified version of my layout. Bunch of image views, Text views that are constrainted to…
scottyab
  • 21,990
  • 15
  • 91
  • 102
43
votes
5 answers

Start motion scene programmatically

I have a motion layout with this layoutDescription: app:layoutDescription="@xml/scene" scene.xml
Pablo Cegarra
  • 15,396
  • 8
  • 79
  • 98
14
votes
5 answers

Android Motionlayout: Android resource linking failed

I keep getting build errors after a refactor to motionlayout 2.0.0-beta1 (I know it's not the newest version - beta2 produces same errors). Here's the stacktrace: AAPT:…
Bohsen
  • 3,848
  • 3
  • 26
  • 46
14
votes
4 answers

Problem with multiple Transitions in Android MotionLayout

I'm playing around with the MotionLayout in Android. I'm using the alpha 2 version. 'com.android.support.constraint:constraint-layout:2.0.0-alpha2' I want to react to two different button clicks and trigger an animation for each of them. My current…
aba
  • 163
  • 1
  • 7
13
votes
8 answers

MotionLayout: MotionScene OnClick overrides setOnClickListener

I'm just starting to play with MotionLayout. I have defined an activity layout using MotionLayout that uses a MotionScene to hide and show a view. The MotionScene transition looks like this:
MayNotBe
  • 1,810
  • 2
  • 25
  • 44
13
votes
1 answer

MotionLayout and ConstraintLayout not animating around children height

While playing with MotionLayouts in a RecyclerView I noticed that the MotionLayouts would not animate the wrapping around their children if these happened to change in height. A simple way to reproduce that behaviour would be with the following…
12
votes
1 answer

Motion Layout with EditText destroys animations

I created a simple MotionLayout which is almost similar to a coordinator layout (animations are slightly different). Something like this here: Using (a couple) EditText Views within the content area breaks the MotionLayout Animations once the…
LuckyMalaka
  • 9,651
  • 4
  • 32
  • 56
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
  • 4,946
  • 14
  • 48
  • 74
10
votes
3 answers

How to run particular transition in MotionLayout?

I have a MotionScene with 4 ConstraintSets representing 4 states of screen (loading states) and with 3 Transitions between them. When my app state changes from e.g. loading to processing, I want to run Transition 1 (set1 -> set2), when state changes…
10
votes
0 answers

How to let NestedScrollView scroll in MotionLayout?

I have a NestedScrollView in MotionLayout once Motion Scene is ended then NestedScrollView is visible but when i try scrolling the view no event's are going to NestedScrollView. Video of Requirement Layout xml:
Anmol
  • 5,619
  • 3
  • 28
  • 54
10
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:
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
  • 527
  • 1
  • 7
  • 18
10
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
13 answers

Is it possible to disable MotionLayout?

I'v got a Fragment that hosts a RecyclerView within a MotionLayout. On top of the recycler view I've got a view that collapses and expands, all done in my motion scene. It is triggered by a click as well as responding to dragging the recycler view.…
stephanmantel
  • 1,475
  • 2
  • 14
  • 22
10
votes
4 answers

Motion layout prevents update on recyclerview

I have started using motion layout for some top bar scrolling, and looks like there is an issue that prevents recycler view from showing updated data. Currently I am using 2.0.0-alpha3 of ConstraintLayout. In the view I have toolbar and 2 tabs that…
user2141889
  • 1,925
  • 5
  • 18
  • 22
1
2 3
23 24