Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement carousel (card slider) with Jetpack compose?

I had been using this library to implement carousel in the View system. How do I implement carousel in Jetpack Compose?

like image 632
Sparsh Dutta Avatar asked May 07 '21 08:05

Sparsh Dutta


People also ask

How do I enable jetpack carousel?

You can enable Carousel by visiting the Media section at Jetpack → Settings → Writing in your dashboard. From this page you can also choose to show or hide the photo Exif metadata and the comments area in the image lightbox, as well as change the Carousel color scheme.

Can jetpack compose compose be used for Android?

Jetpack Compose for Android, it sounds good! In this second part we will be actually getting our hands dirty as we will create the Profile Card layout similar to the CardView in Android using only Jetpack composable functions.

What is card in jetpack compose?

A Card is a container that can be used as a parent view for declaring multiple UI elements inside it. It has an elevation property that applies a shadow effect around it. In this article, we will show you how you could implement a simple Card in Android using Jetpack Compose. Follow the below steps once the IDE is ready.

How to create a carousel in ReactJS?

Let’s create the Carousel.js first with the following code: We need to create 2 components: Carousel & CarouselItem The Carousel component will be the main controller to control the items The CarouselItem component will render the item itself. We just need to pass the width property to this component for now


1 Answers

Well... It depends of the which feature you need from this library, but for "simple" pager you can use Pager Accompanist library.

https://github.com/google/accompanist/tree/main/pager

And you can check the docs here:

https://google.github.io/accompanist/pager/

like image 93
nglauber Avatar answered Oct 16 '22 17:10

nglauber