sayyam / carouselview

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

Adding Long Click functionality #110

Open sqljim opened 5 years ago

sqljim commented 5 years ago

Adding the ability to long click touch events for each image.

LebonNic commented 2 years ago

Hi @sayyam! Is it possible to accept the pull request and release a new version? Or is this library not maintained anymore?

LebonNic commented 2 years ago

A workaround:

imagesCarousel.setImageListener { position, imageView ->
    imageView.setOnLongClickListener {
        onLongClick(position)
        return@setOnLongClickListener true
    }

    imageView.setOnClickListener {
        onClick(position)
    }
}