carousel.getCurrentItem into an ImageView?
aalasafidler opened this issue · 2 comments
aalasafidler commented
I am wondering how to generate a new ImageView from the current item stored in my carousel?
sqljim commented
This should do it for you:
carouselView = (CarouselView) findViewById(R.id.carousel_view);
carouselView.setImageClickListener(new ImageClickListener() {
@Override
public void onClick(int position) {
CarouselViewPager viewPager = carouselView.getContainerViewPager();
ImageView currentImage = (ImageView) viewPager.getChildAt(position);
}
});
Krusnik02 commented
This is not working - OnClick is calling only of there was click on image. But if caorusel changes there is now click.