sayyam/carouselview

carousel.getCurrentItem into an ImageView?

aalasafidler opened this issue · 2 comments

I am wondering how to generate a new ImageView from the current item stored in my carousel?

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);

}
});

This is not working - OnClick is calling only of there was click on image. But if caorusel changes there is now click.