sayyam / carouselview

A simple library to add carousel view in android app.
Apache License 2.0
1.15k stars 260 forks source link

How set space between images? #117

Open alexei-28 opened 4 years ago

alexei-28 commented 4 years ago

Android Studio 3.6 implementation 'com.synnapps:carouselview:0.1.4'

Here my activity:

 dataBinding.carouselView.setPageCount(campaignImages.size);
        dataBinding.carouselView.setImageListener(imageListener);

here layout:

<androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/carouselContainer"
                    android:layout_width="0dp"
                    android:layout_height="@dimen/container_height"
                    android:layout_marginTop="@dimen/default_margin"
                    android:layout_marginBottom="@dimen/default_margin"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="@+id/profileContainer"
                    app:layout_constraintHorizontal_bias="0.5"
                    app:layout_constraintStart_toStartOf="@+id/profileContainer"
                    app:layout_constraintTop_toBottomOf="@+id/mapContainer">

                    <com.synnapps.carouselview.CarouselView
                        android:id="@+id/carouselView"
                        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"
                        app:pageColor="#00000000"
                        app:radius="6dp"
                        app:slideInterval="3000"
                        app:strokeColor="#FF777777"
                        app:strokeWidth="1dp" />

                </androidx.constraintlayout.widget.ConstraintLayout>

            </androidx.constraintlayout.widget.ConstraintLayout>

Here my layout:

Here result:

image

As you can see , no spaces between images.

But I need smt like this:

image

Is is possible?

nguyenvanan18031993 commented 1 year ago

Hi, Do you resolve it, bro?

alexei-28 commented 1 year ago

Hi, Do you resolve it, bro?

No.

nguyenvanan18031993 commented 1 year ago

I'm waiting for solution, too.