Motion layout over Viewpager is not working

Viewed 520

My motionlayout has a viewpager and image. While Viewpager is sliding image should move but its not working. Any idea to solve this?

    <androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layoutDescription="@xml/scene_donut"
    app:showPaths="true"
    tools:context=".ui.onboarding.OnboardingActivty">

    <androidx.viewpager.widget.ViewPager
        android:id="@+id/pager"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <ImageView
        android:id="@+id/android_img"
        android:layout_width="wrap_content"
        android:layout_height="96dp"
        android:src="@drawable/pin1"
        app:layout_constraintBottom_toTopOf="@+id/guide_bottom"
        app:layout_constraintStart_toStartOf="parent" />
...
0 Answers
Related