daimajia / AndroidImageSlider

An amazing and convenient Android image slider.
MIT License
5.63k stars 1.66k forks source link

How to add placeholder in imageSlider #159

Open aweke-123 opened 8 years ago

aweke-123 commented 8 years ago

Hi, Is there any way to specify default image if image does not load ?

Thanks!

chan32167 commented 8 years ago

Added a placeholder image,

check my project @ https://github.com/chan32167/AndroidImageSlider

TextSliderView textSliderView = new TextSliderView(this); // initialize a SliderLayout String originalImagePath = "http://blabla.com/bigimage.jpg" String smallImagePath = "http://blabla.com/smallimage.jpg"

          textSliderView.image(originalImagePath).imageLowRes(smallImagePath).imagePlaceHolder(R.drawable.no_photo)
                    .setScaleType(BaseSliderView.ScaleType.CenterCrop)
                    .setOnSliderClickListener(this);
UsmanGhauri commented 7 years ago

@kambleanjali1993 : see my answer https://github.com/daimajia/AndroidImageSlider/issues/294