MotionLayout이 적용되는 계층에 있는 모든 View엔 android:visibility 속성이 적용되지 않는다.

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>

해결방법은 크게 두가지

  1. MotionLayout 내부에 새로운 ViewGroup 계층을 만들어서 그 하위 View로 집어넣기
  2. 또는 MotionScene을 정의하는 xml에서 visibilityMode="ignore" 속성을 선언한다.
<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:motion="http://schemas.android.com/apk/res-auto"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <Transition
        ...
    </Transition>

    <ConstraintSet android:id="@+id/start">

        <Constraint android:id="@id/viewId">
            <PropertySet
                app:applyMotionScene="false"
                app:visibilityMode="ignore" />
        </Constraint>

    </ConstraintSet>

    <ConstraintSet
        android:id="@+id/end"
        motion:deriveConstraintsFrom="@id/start">
        ...
    </ConstraintSet>

</MotionScene>

참고 링크