denzcoskun / ImageSlideshow

Android image slider.
Apache License 2.0
354 stars 141 forks source link

Is it possible to assign an id to each imageList? #91

Open mixggggg opened 1 year ago

mixggggg commented 1 year ago

Hello. Is it possible to assign an id for each ImageList? I use your library in my project and when I click on the picture, it opens in another window where it can be made larger. but when you go to another page, the same picture always opens, regardless of which one you clicked. the problem will be solved if each ImageList has its own id. how can this be done?

mixggggg commented 1 year ago

I've been suffering all day. as soon as I wrote here, I immediately found a solution

override fun onItemSelected(position: Int) { when(position){ 0 -> fotoView.setImageResource(imageId) 1 -> fotoView.setImageResource(imageId2) 2 -> fotoView.setImageResource(imageId3)}

DavidFerdian commented 1 year ago

imageslider.setItemClickListener(object : ItemClickListener { override fun doubleClick(position: Int) { // can be blank if u dont use it but need to be included } override fun onItemSelected(position: Int) { Log.i("image",sampleImage[position].bannerId) } })

DavidFerdian commented 1 year ago

imageslider.setItemClickListener(object : ItemClickListener { override fun doubleClick(position: Int) { // can be blank if u dont use it but need to be included } override fun onItemSelected(position: Int) { Log.i("image",sampleImage[position].bannerId) } })

i'm using something like this to get each other imageid