Start motion scene programmatically
Finally Im doing this: ((MotionLayout)findViewById(R.id.motionLayout)).transitionToEnd(); ((MotionLayout)findViewById(R.id.motionLayout)).transitionToStart();
Finally Im doing this: ((MotionLayout)findViewById(R.id.motionLayout)).transitionToEnd(); ((MotionLayout)findViewById(R.id.motionLayout)).transitionToStart();
Turns out this was my inexperience with how MotionLayout works. By default MotionLayout controls the visibility of all views within it. But you can opt out child views by using the app:visibilityMode=”ignore” attribute and defining the view in the <ConstraintSet> In my case <CustomViewGroup1> looks like this… <Constraint android:id=”@id/CustomViewGroup1″ app:layout_constraintBottom_toBottomOf=”parent” app:layout_constraintEnd_toEndOf=”parent” app:layout_constraintStart_toStartOf=”parent” app:layout_constraintTop_toBottomOf=”@+id/HeaderBackground” app:layout_constraintVertical_weight=”1″ app:visibilityMode=”ignore” … Read more