Closed katherineCruzG closed 1 year ago
Please share some codes. Like the XMLs and init codes.
this is the code in xml <org.imaginativeworld.whynotimagecarousel.ImageCarousel android:id="@+id/carousel" android:layout_width="match_parent" android:layout_height="300dp" app:imageScaleType="centerInside" app:carouselType="SHOWCASE" app:carouselGravity="CENTER" app:scaleOnScroll="true" app:carouselBackground="#ffff4444"
/>
This is the code in java list.add( new CarouselItem( R.drawable.fondo_3, "Photo by Kimiya Oveisi on Unsplash" ) );
carousel.setCarouselType(CarouselType.SHOWCASE);
carousel.addData(list);
And that would add everything in the mainActivity? Type the code of example 3? Or do I have to create one similar to that or could I use that?
Carousel properties can be set in the XML or in code. No issue.
But you have to create a custom layout for the carousel item. Must have fixed width.
and could you create that custom design in the xml or could you give me an example?
The example you provided is in Kotlin, can you provide an example of how we could do it in Java? Thanks.
@matthewlu341 Java example already exists. Please check this.
@katherineCruzG You will find the samples here.
I put it in the two ways that are in the repository and neither works, any solution for this error?