0

I tried to use 'com.synnapps:carouselview:0.0.9' in eclipse but I couldn't.

I downloaded carouselview.jar and added it to Eclipse but Eclipse couldn't see the contents of the jar file.

This example is what I followed: https://github.com/sayyam/carouselview

public class SampleCarouselViewActivity extends AppCompatActivity {
    CarouselView carouselView;

    int[] sampleImages = {R.drawable.image_1, R.drawable.image_2, R.drawable.image_3, R.drawable.image_4, R.drawable.image_5};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sample_carousel_view);

        carouselView = (CarouselView) findViewById(R.id.carouselView);
        carouselView.setPageCount(sampleImages.length);

        carouselView.setImageListener(imageListener);
    }

    ImageListener imageListener = new ImageListener() {
        @Override
        public void setImageForPosition(int position, ImageView imageView) {
            imageView.setImageResource(sampleImages[position]);
        }
    };
}

The problem is

CarouselView cannot be resolved to a type.

Can any one help me how to use the CarouselView library in Eclipse?

Blackwood
  • 4,504
  • 16
  • 32
  • 41

0 Answers0