In my HomeFragment, I want to add a Card at the center of my activity ( an ImageView ) which receives the value of a Uri stored in Firebase Database. That is working perfectly right now. My main idea is to have an infinite swipeable ImageViews, for example, like Tinder. I've seen a lot of GitHub projects but I am a noob in android development and I can't seem to find a solution to my problem. Can anyone help me in a detailed way I can I achieve this? Here is my idea (this is from this Github Project that had exactly what I wanted, I followed the steps in the guide but I had no success):
Click this link to see the gif, please
This is my layout currently (I know, it has nothing to do what I want to do make right now but this was the only thing I could make. Forget the Horizontal Scroll View and the 3 ImageViews, I want just to show one!)
<HorizontalScrollView
android:id="@+id/scrlVPrincipal2"
android:layout_width="545dp"
android:layout_height="414dp"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_marginTop="32dp"
android:scrollbars="none"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtHomeDesc"
app:layout_constraintVertical_bias="0.42"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="0dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingRight="1000dp">
<RelativeLayout
android:layout_width="1066dp"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imgCard1"
android:layout_width="259dp"
android:layout_height="390dp"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginStart="13dp"
android:layout_weight="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.504"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.801" />
<ImageView
android:id="@+id/imgCard3"
android:layout_width="259dp"
android:layout_height="390dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="221dp"
android:layout_weight="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.504"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.801" />
<TextView
android:id="@+id/txtPaisNome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_gravity="bottom"
android:layout_marginBottom="25dp"
android:layout_marginStart="27dp"
android:text="TextView"
android:textAlignment="center"
android:textColor="@color/colorWhite"
android:textSize="25dp" />
<ImageView
android:id="@+id/imgCard2"
android:layout_width="259dp"
android:layout_height="390dp"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_gravity="right"
android:layout_marginStart="298dp"
android:layout_weight="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.504"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.801" />
</RelativeLayout>
</FrameLayout>
</HorizontalScrollView> -->