sayyam / carouselview

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

How to make round corners of the carouselview #119

Closed sumit-kmr closed 4 years ago

sumit-kmr commented 4 years ago

Is there any way to round the corners of the whole carouselview?

aqeel371 commented 4 years ago

You can add ViewListener inside of ImageListener and can use custom view like this

var viewListener:ViewListener = object :ViewListener{
        override fun setViewForPosition(position: Int): View {
            val view = layoutInflater.inflate(R.layout.item_slider, null)
            view.ivSlider.setImageResource(sampleImages[position])
            return view
        }

    }
Screenshot 2020-05-10 at 10 44 15 AM